Skip to content
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

EditOrder behavior for Bitget. C# #22304

Closed
skuvv opened this issue Apr 27, 2024 · 4 comments
Closed

EditOrder behavior for Bitget. C# #22304

skuvv opened this issue Apr 27, 2024 · 4 comments
Assignees
Labels

Comments

@skuvv
Copy link

skuvv commented Apr 27, 2024

Operating System

Windows 10

Programming Languages

No response

CCXT Version

4.3.6

Description

When I edit an order using Biget await _exchange.EditOrder
I retrieve two records from await exchange.WatchOrders:

On message: {"action":"snapshot","arg":{"instType":"SUSDT-FUTURES","channel":"orders","instId":"default"},"data":[{"accBaseVolume":"0","cTime":"1714219644386","clientOid":"240427150659_3","enterPointSource":"API","feeDetail":[{"feeCoin":"SUSDT","fee":"0"}],"force":"gtc","instId":"SXRPSUSDT","leverage":"10","marginCoin":"SUSDT","marginMode":"crossed","notionalUsd":"8.0784","orderId":"1168087339327201281","orderType":"limit","posMode":"hedge_mode","posSide":"long","price":"0.5049","reduceOnly":"no","side":"buy","size":"16","status":"canceled","tradeSide":"open","uTime":"1714219660954"}],"ts":1714219660957}
On message: {"action":"snapshot","arg":{"instType":"SUSDT-FUTURES","channel":"orders","instId":"default"},"data":[{"accBaseVolume":"0","cTime":"1714219660957","clientOid":"240427150716_4","enterPointSource":"API","feeDetail":[{"feeCoin":"SUSDT","fee":"0"}],"force":"gtc","instId":"SXRPSUSDT","leverage":"10","marginCoin":"SUSDT","marginMode":"crossed","notionalUsd":"8.08","orderId":"1168087408831012871","orderType":"limit","posMode":"hedge_mode","posSide":"long","price":"0.505","reduceOnly":"no","side":"buy","size":"16","status":"live","tradeSide":"open","uTime":"1714219660957"}],"ts":1714219660959}

Let's assume that the order was modified outside API (eg at WEB). How can I understand that the order was modified but not cancelled only by first record?
Here are two unlinked records.
Bitget does not allow to send the same clientOid.

Code

  

@carlosmiei carlosmiei self-assigned this Apr 29, 2024
@carlosmiei
Copy link
Collaborator

carlosmiei commented Apr 29, 2024

Hello @skuvv,

When you edit an order you're actually canceling+placing a new order at bitget, hence the two unlinked records (the order canceled and the new one).

CXT v4.3.11
bitget.watchOrders (LTC/USDT:USDT)
       symbol |                  id |                        clientOrderId |     timestamp |                 datetime | lastTradeTimestamp |  type | timeInForce | postOnly | side | price | amount | cost | filled | remaining |   status |                          fee | trades |                           fees
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
LTC/USDT:USDT | 1168858191115231247 |                  1168858191127814147 | 1714403429776 | 2024-04-29T15:10:29.776Z |      1714403583667 | limit |         GTC |    false |  buy |    50 |    0.1 |    5 |      0 |       0.1 | canceled | {"cost":0,"currency":"USDT"} |     [] | [{"cost":0,"currency":"USDT"}]
LTC/USDT:USDT | 1168858836614422533 | e0e5044e-0092-4eec-8375-49362667b7db | 1714403583673 | 2024-04-29T15:13:03.673Z |      1714403583673 | limit |         GTC |    false |  buy |    52 |    0.1 |  5.2 |      0 |       0.1 |     open | {"cost":0,"currency":"USDT"} |     [] | [{"cost":0,"currency":"USDT"}]
2 objects

@skuvv
Copy link
Author

skuvv commented Apr 29, 2024

I suppose there is no way to link these orders or add an information about replace in canceled order...

@carlosmiei
Copy link
Collaborator

@skuvv Unfortunately I don't think so, edit in this case is only a shortcut for canceling+placing a new order

@skuvv
Copy link
Author

skuvv commented Apr 29, 2024

Ok, thank you for information. Will look to another way.

@skuvv skuvv closed this as completed Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants