burakoner / OKX.Api

Up-to-date, most-complete, well-organized, well-documented, easy-to-use, multi-task and multi-thread compatible OKX Cryptocurrency Exchange Rest and Websocket Api Wrapper
MIT License
39 stars 15 forks source link

add request header for demo version #9

Closed overstartup closed 1 year ago

overstartup commented 1 year ago

i had chat with okx api developers. it seems we missed the header to get demo data. They asked me to change this header: Add to request header。x-simulated-trading: 1

The check was for this endpoint, but I don't know if you need to add it for others too. api.PublicData.GetInstrumentsAsync(...);

burakoner commented 1 year ago

You can simply set DemoTradingService=true in OkxRestApiClientOptions

overstartup commented 1 year ago

it doesn't solve the issue. Because it still set wrong order size. The support told me it needs the header to return correct data for demo version.

burakoner commented 1 year ago

DemoTradingService=true adds header parameter