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

add Label field to user_trade #10

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

add Label field to user_trade #10

wants to merge 10 commits into from

Conversation

kevenli
Copy link

@kevenli kevenli commented Oct 10, 2024

Deribit Doc missed a "label" field on user.trade.xxx event data. The "label" contains corresponding label parameter of the buy/sell request.

Since user.trades.xxx event is earlier than user.orders.xxx, handling by label is more efficient.

Here is the log to show that the field exists.

2024/10/10 01:53:44 sendOrder, &{{bc100da0-b9f3-4991-9679-a7d189986922 bc100da0-b9f3-4991-9679-a7d189986922  0xc00014eb80 1 1 1 1 10 0 1 0001-01-01 00:00:00 +0000 UTC 0 0 []} 0xc0001247e0  {0 0}  }
2024/10/10 01:53:44 sendOrder params: {BTC-PERPETUAL 10 market bc100da0-b9f3-4991-9679-a7d189986922 0 good_til_cancelled <nil> false false 0  }
2024/10/10 01:53:44 Channel: user.trades.any.any.raw [{"liquidity":"T","risk_reducing":false,"order_type":"market","trade_id":"191715010","fee_currency":"BTC","contracts":1.0,"reduce_only":false,"self_trade":false,"post_only":false,"mmp":false,"fee":8e-8,"tick_direction":0,"matching_id":null,"order_id":"28923304722","mark_price":60763.53,"api":true,"trade_seq":113665972,"instrument_name":"BTC-PERPETUAL","profit_loss":0.0,"index_price":60721.31,"direction":"buy","amount":10.0,"price":60810.0,"state":"filled","timestamp":1728525224281,"label":"bc100da0-b9f3-4991-9679-a7d189986922"}]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant