MCPcopy Create free account
hub / github.com/ccxt/ccxt / fetch_order_trades

Method fetch_order_trades

python/ccxt/async_support/gate.py:3510–3549  ·  view source on GitHub ↗

fetch all the trades made from a single order https://www.gate.com/docs/developers/apiv4/en/#query-personal-trading-records https://www.gate.com/docs/developers/apiv4/en/#query-personal-trading-records-by-time-range https://www.gate.com/docs/developers/apiv4/en/#que

(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={})

Source from the content-addressed store, hash-verified

3508 return self.parse_trades(response, market, since, limit)
3509
3510 async def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3511 """
3512 fetch all the trades made from a single order
3513
3514 https://www.gate.com/docs/developers/apiv4/en/#query-personal-trading-records
3515 https://www.gate.com/docs/developers/apiv4/en/#query-personal-trading-records-by-time-range
3516 https://www.gate.com/docs/developers/apiv4/en/#query-personal-trading-records-3
3517 https://www.gate.com/docs/developers/apiv4/en/#query-personal-trading-records-4
3518
3519 :param str id: order id
3520 :param str symbol: unified market symbol
3521 :param int [since]: the earliest time in ms to fetch trades for
3522 :param int [limit]: the maximum number of trades to retrieve
3523 :param dict [params]: extra parameters specific to the exchange API endpoint
3524 :returns dict[]: a list of `trade structures <https://docs.ccxt.com/?id=trade-structure>`
3525 """
3526 if symbol is None:
3527 raise ArgumentsRequired(self.id + ' fetchOrderTrades() requires a symbol argument')
3528 await self.load_markets()
3529 #
3530 # [
3531 # {
3532 # "id":"3711449544",
3533 # "create_time":"1655486040",
3534 # "create_time_ms":"1655486040177.599900",
3535 # "currency_pair":"SHIB_USDT",
3536 # "side":"buy",
3537 # "role":"taker",
3538 # "amount":"1360039",
3539 # "price":"0.0000081084",
3540 # "order_id":"169717399644",
3541 # "fee":"2720.078",
3542 # "fee_currency":"SHIB",
3543 # "point_fee":"0",
3544 # "gt_fee":"0"
3545 # }
3546 # ]
3547 #
3548 response = await self.fetch_my_trades(symbol, since, limit, {'order_id': id})
3549 return response
3550
3551 async def fetch_my_trades(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
3552 """

Callers

nothing calls this directly

Calls 3

fetch_my_tradesMethod · 0.95
ArgumentsRequiredClass · 0.90
load_marketsMethod · 0.45

Tested by

no test coverage detected