Get an order by ID. https://docs.foxbit.com.br/rest/v3/#tag/Trading/operation/OrdersController_findByOrderId @param id :param str symbol: it is not used in the foxbit API :param dict [params]: extra parameters specific to the exchange API endpoint :returns
(self, id: str, symbol: Str = None, params={})
| 1080 | })] |
| 1081 | |
| 1082 | def fetch_order(self, id: str, symbol: Str = None, params={}) -> Order: |
| 1083 | """ |
| 1084 | Get an order by ID. |
| 1085 | |
| 1086 | https://docs.foxbit.com.br/rest/v3/#tag/Trading/operation/OrdersController_findByOrderId |
| 1087 | |
| 1088 | @param id |
| 1089 | :param str symbol: it is not used in the foxbit API |
| 1090 | :param dict [params]: extra parameters specific to the exchange API endpoint |
| 1091 | :returns dict: An `order structure <https://docs.ccxt.com/?id=order-structure>` |
| 1092 | """ |
| 1093 | self.load_markets() |
| 1094 | request = { |
| 1095 | 'id': id, |
| 1096 | } |
| 1097 | response = self.v3PrivateGetOrdersByOrderIdId(self.extend(request, params)) |
| 1098 | # { |
| 1099 | # "id": "1234567890", |
| 1100 | # "sn": "OKMAKSDHRVVREK", |
| 1101 | # "client_order_id": "451637946501", |
| 1102 | # "market_symbol": "btcbrl", |
| 1103 | # "side": "BUY", |
| 1104 | # "type": "LIMIT", |
| 1105 | # "state": "ACTIVE", |
| 1106 | # "price": "290000.0", |
| 1107 | # "price_avg": "295333.3333", |
| 1108 | # "quantity": "0.42", |
| 1109 | # "quantity_executed": "0.41", |
| 1110 | # "instant_amount": "290.0", |
| 1111 | # "instant_amount_executed": "290.0", |
| 1112 | # "created_at": "2021-02-15T22:06:32.999Z", |
| 1113 | # "trades_count": "2", |
| 1114 | # "remark": "A remarkable note for the order.", |
| 1115 | # "funds_received": "290.0" |
| 1116 | # } |
| 1117 | return self.parse_order(response) |
| 1118 | |
| 1119 | def fetch_orders(self, symbol: Str = None, since: Int = None, limit: Int = None, params={}) -> List[Order]: |
| 1120 | """ |
nothing calls this directly
no test coverage detected