-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Perp positions delay in API call to /v2/positions #104
Comments
hi, thanks for the report.
It should be patched in the latest release/commit.
can you describe your usecase more? would they all market close? |
Fixed it straight away! |
I am very sorry, I have to reopen. I just had a brief look this morning. It does work fine for the first order via gateway. But for all (successful) consecutive orders, /v2/positions does not show the correct perp data. It only returns the data from the first order. You have this as well? |
apologies, somehow missed this comment. I can't reproduce this issue. can you try running gateway with this env var set and sharing any logs that come out of it: RUST_LOG="info,solana_rpc_client::http_sender=debug,wsaccsub=debug,ws=debug,rpc=debug,marketmap=debug,oraclemap=debug" also which RPC provider do you use? |
By activating debug on the gateway I get a lot of the same error:
Gateway is basically working, but I understand that using the RPC endpoint https://api.mainnet-beta.solana.com is not recommended for stable environment. Can you give some advice for other possibilities?
I am basically making 50 API requets a day, maybe 500 if there is congestion due to retries. Thanks for advice and helping out. |
the https://www.helius.dev free plan is a great place to start, I frequently use it to test gateway without issue |
Helius works great. No problems so far. |
I send an order for SOL-PERP via API call /v2/orders and in the GUI (https://app.drift.trade/overview/positions) I see it popping up first as "Open Orders" and then after seconds in "Open Positions". Great!
But when I query /v2/positions I dont see any perp data for quite a while in the reponse.
Even after 5 minutes still no data in json key "perp".
Also */v2/positionInfo/0 * gives me an error "{"code": 400,"reason": "no position"}, allthough I see the position in the GUI in "Open Positions".
Can you reproduce this?
Is there another way to do a "Close all positions" API call, instead of creating a order with the data from /v2/positions?
Thanks in advance!
The text was updated successfully, but these errors were encountered: