fetches information on an order made by the user https://api.latoken.com/doc/v2/#tag/Order/operation/getOrderById https://api.latoken.com/doc/v2/#tag/StopOrder/operation/getStopOrderById :param str id: order id :param str [symbol]: not used by latoken fetch
(self, id: str, symbol: Str = None, params={})
| 1257 | return self.parse_orders(response, market, since, limit) |
| 1258 | |
| 1259 | def fetch_order(self, id: str, symbol: Str = None, params={}): |
| 1260 | """ |
| 1261 | fetches information on an order made by the user |
| 1262 | |
| 1263 | https://api.latoken.com/doc/v2/#tag/Order/operation/getOrderById |
| 1264 | https://api.latoken.com/doc/v2/#tag/StopOrder/operation/getStopOrderById |
| 1265 | |
| 1266 | :param str id: order id |
| 1267 | :param str [symbol]: not used by latoken fetchOrder |
| 1268 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 1269 | :param boolean [params.trigger]: True if fetching a trigger order |
| 1270 | :returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>` |
| 1271 | """ |
| 1272 | self.load_markets() |
| 1273 | request = { |
| 1274 | 'id': id, |
| 1275 | } |
| 1276 | isTrigger = self.safe_value_2(params, 'trigger', 'stop') |
| 1277 | params = self.omit(params, ['stop', 'trigger']) |
| 1278 | response: dict |
| 1279 | if isTrigger: |
| 1280 | response = self.privateGetAuthStopOrderGetOrderId(self.extend(request, params)) |
| 1281 | else: |
| 1282 | response = self.privateGetAuthOrderGetOrderId(self.extend(request, params)) |
| 1283 | # |
| 1284 | # { |
| 1285 | # "id":"a76bd262-3560-4bfb-98ac-1cedd394f4fc", |
| 1286 | # "status":"ORDER_STATUS_PLACED", |
| 1287 | # "side":"ORDER_SIDE_BUY", |
| 1288 | # "condition":"ORDER_CONDITION_GOOD_TILL_CANCELLED", |
| 1289 | # "type":"ORDER_TYPE_LIMIT", |
| 1290 | # "baseCurrency":"620f2019-33c0-423b-8a9d-cde4d7f8ef7f", |
| 1291 | # "quoteCurrency":"0c3a106d-bde3-4c13-a26e-3fd2394529e5", |
| 1292 | # "clientOrderId":"web-macos_chrome_1a6a6659-6f7c-4fac-be0b-d1d7ac06d", |
| 1293 | # "price":"4000.00", |
| 1294 | # "quantity":"0.01", |
| 1295 | # "cost":"40.000000000000000000", |
| 1296 | # "filled":"0", |
| 1297 | # "trader":"7244bb3a-b6b2-446a-ac78-fa4bce5b59a9", |
| 1298 | # "creator":"ORDER_CREATOR_USER", |
| 1299 | # "creatorId":"", |
| 1300 | # "timestamp":1635920767648 |
| 1301 | # } |
| 1302 | # |
| 1303 | return self.parse_order(response) |
| 1304 | |
| 1305 | def create_order(self, symbol: str, type: OrderType, side: OrderSide, amount: float, price: Num = None, params={}): |
| 1306 | """ |
nothing calls this directly
no test coverage detected