question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Okex sandbox problem with watch_orders. newUpdates : True sometimes does not work

See original GitHub issue

OS:Windows 10 Programming Language version: Python 3.9 CCXT Pro Version 0.9.90 ( just subscribed it) CCXT Version 1.71.96 Exchange Okex sandbox

okex_test = ccxtpro.okex({'verbose': True,
                                  'enableRateLimit': False,
                                  'apiKey': '',                                
                                  'secret': '1F,
                                  'password': 'P,
                                  'newUpdates': True,
'                                 'headers': {"x-simulated-trading": 1}, # https://github.com/ccxt/ccxt/pull/11108
                                 ​'options': {
                                     ​'tradesLimit': 1000,
                                     ​'OHLCVLimit': 1000,
                                     ​'ordersLimit': 1000,
                                 ​},
                                 ​})
  okex_test.set_sandbox_mode(True)
  markets = await okex_test.load_markets() 

Having instantiated the exchange like in the code above, with newUpdates': True i do order = await okex_test.watch_orders(symbol)

when I send a market order to OKX I usually get 2 responses:

  1. 'type': 'market', 'status': 'open'

after few mls

2) 'type': 'market', 'status': 'closed'

sometimes I do not get the 'type': 'market', 'status': 'open' first answer but I get 2 'type': 'market', 'status': 'closed' answers one is relative to my last order and the other one to the previous order, This should not happen with 'newUpdates': True,

I cannot replicate the issue because it happens only sometimes and it would be extremely difficult to post a snippet of my code ( the okx market order is sent only after a limit order is filled on another market ).

can you please help me investigating this problem

Tx

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:34 (15 by maintainers)

github_iconTop GitHub Comments

2reactions
carlosmieicommented, Jul 6, 2022

@ShieldTrade I’m sorry, I misinterpreted the problem initially but will get back to it asap

1reaction
carlosmieicommented, May 19, 2022

@ShieldTrade I haven’t had the chance yet but I’ll let you know as soon as I manage to do it

Read more comments on GitHub >

github_iconTop Results From Across the Web

Okex sandbox problem with watch_orders #11855
Having instantiated the exchange like in the code above I can send order with no problems (symbol = 'BTC/USDT:USDT'. perpetual swap) but I...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found