Skip to content

Commit

Permalink
Merge pull request ccxt#17942 from sc0Vu/patch-bitget-17900
Browse files Browse the repository at this point in the history
bitget: patch returned order is defined
  • Loading branch information
kroitor authored May 18, 2023
2 parents ce7fc26 + 3065168 commit 9932a1d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ts/src/bitget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2992,7 +2992,7 @@ export default class bitget extends Exchange {
'symbol': market['id'],
'orderId': id,
};
const response = await this[method] (this.extend (request, query));
let response = await this[method] (this.extend (request, query));
// spot
// {
// code: '00000',
Expand Down Expand Up @@ -3044,6 +3044,10 @@ export default class bitget extends Exchange {
// }
// }
//
// response will be string after filled, see: ccxt/ccxt#17900
if (typeof response === 'string') {
response = JSON.parse (response);
}
const data = this.safeValue (response, 'data');
const first = this.safeValue (data, 0, data);
return this.parseOrder (first, market);
Expand Down

0 comments on commit 9932a1d

Please sign in to comment.