fetch_open_orders error for gateio
See original GitHub issue- OS: linux
- Programming Language version: python 3.10
- CCXT version: 1.0.65
Hi, I have some issue with fetch open orders for gateio cross margin. fetch_open_orders for gateio margin returns all orders on spot fetch_open_orders for gateio cross margin does not return any orders
import asyncio
import ccxtpro
from pprint import pprint
import sys
sys.stdout = open('error', 'w')
print(ccxtpro.__version__)
exchange = get_exchange('gateio_hedge_margin')
# exchange: ccxtpro.Exchange = getattr(ccxtpro, 'gateio')({
# 'enableRateLimit': True,
# 'apiKey': '',
# 'secret': '',
# 'uid': '',
# 'options': {
# 'defaultType': 'margin',
# }
# })
symbol = 'XCAD/USDT'
exchange.verbose=True
async def main():
while True:
response = await exchange.fetch_open_orders(symbol)
# response = await exchange.fetch_open_orders(symbol, params={'defaultType': 'cross_margin'})
pprint(response)
break
await exchange.close()
asyncio.run(main())
REPLACE_THIS_WITH_YOUR_OUTPUT_ERROR_EXCEPTION_IN_TEXT_NO_SCREENSHOTS
Issue Analytics
- State:
- Created a year ago
- Comments:7 (7 by maintainers)
Top Results From Across the Web
Possible Causes of Contract Order Failure - Gate.io
Opening a position: 1.Check if there is sufficient balance in your contract account, if there isn't, you will be notified "Transfer fund first"....
Read more >About not processing buy order for newly listed coins on gate.io
When a coin countdown ends and it is opened to trade, I create an order within the first 164 milliseconds at the latest....
Read more >Gate exchange can't get orders using app script - Stack Overflow
I run script in app script to get data from gate API by GET /spot/orders ... This code is work good and give...
Read more >gate-api - PyPI
Class Method HTTP request
SubAccountApi list_sub_accounts GET /sub_accounts
SubAccountApi create_sub_accounts POST /sub_accounts
SubAccountApi get_sub_account GET /sub_accounts/
Read more >gate-api - npm
Class Method HTTP request
DeliveryApi listDeliveryContracts GET /delivery//contracts
DeliveryApi getDeliveryContract GET /delivery//contracts/
DeliveryApi listDeliveryOrderBook GET /delivery//order_book
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
That correct, the api endpoint is the same so they’re mixed together
I’ll look into this, currently you need to specify the parameter
account
ascross_margin
but I’ll add a unifiedparams.marginType
parameter@leastchaos It’s updated now, you can now pass
marginMode
in params ascross
orisolated
. When margin mode is unset or set toisolated
both cross andisolated
orders are returned. You can filter them checking whetherinfo['account']
is set tomargin
orspot
Python v3.10.2 CCXT v1.82.16