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

Method fetch_order

python/ccxt/bitso.py:1257–1277  ·  view source on GitHub ↗

fetches information on an order made by the user https://docs.bitso.com/bitso-api/docs/look-up-orders :param str id: the order id :param str symbol: not used by bitso fetchOrder :param dict [params]: extra parameters specific to the exchange API endpoint

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

Source from the content-addressed store, hash-verified

1255 return orders
1256
1257 def fetch_order(self, id: str, symbol: Str = None, params={}):
1258 """
1259 fetches information on an order made by the user
1260
1261 https://docs.bitso.com/bitso-api/docs/look-up-orders
1262
1263 :param str id: the order id
1264 :param str symbol: not used by bitso fetchOrder
1265 :param dict [params]: extra parameters specific to the exchange API endpoint
1266 :returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>`
1267 """
1268 self.load_markets()
1269 response = self.privateGetOrdersOid({
1270 'oid': id,
1271 })
1272 payload = self.safe_value(response, 'payload')
1273 if isinstance(payload, list):
1274 numOrders = len(response['payload'])
1275 if numOrders == 1:
1276 return self.parse_order(payload[0])
1277 raise OrderNotFound(self.id + ': The order ' + id + ' not found.')
1278
1279 def fetch_order_trades(self, id: str, symbol: Str = None, since: Int = None, limit: Int = None, params={}):
1280 """

Callers

nothing calls this directly

Calls 5

parse_orderMethod · 0.95
OrderNotFoundClass · 0.90
safe_valueMethod · 0.80
privateGetOrdersOidMethod · 0.65
load_marketsMethod · 0.45

Tested by

no test coverage detected