spot buy order perplexity
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 18/100
- Issue type
- Feature
- Clarity
- Needs clarification
- Activity status
- Active
- Tech stack
- java
- Domain
- api, fintech-quant
Research direction
This is an open design question about how spot buy order commissions should be reported, not a scoped change. Start by reading how the OKX and Bybit trade services currently populate the order quantity and fee fields, and how the shared trade/order DTOs express commission, to see what a consistent contract could look like. The author plans to finish the Gate and Binance integrations before deciding, so there is no defined done state for a contributor to aim at yet; wait for a decision on raw versus net amounts before touching code.
Written by the indexing model from the issue text.
Description
I’m currently adapting another exchange (OKX) to handle commission currencies.
It got me thinking...
For spot buy orders, the commission is deducted from the quantity of coins purchased—essentially, it’s taken out of the asset itself.
Option one: we could simply return the data as provided by the exchange—the total amount purchased and the commission. In this case, the actual net amount of coins acquired would be the total purchased minus the commission.
Option two: we could subtract the commission ourselves and return the final, net amount of coins received from the order execution, along with the commission—this is how I’ve set it up for Bybit. Another complication arises with "discount coins" (tokens used for fee discounts): if these are enabled, it might become impossible for us to calculate the exact balance unless the exchange explicitly provides that figure.
Correction regarding the second point: in the case of discount coins, we shouldn't subtract anything; we should simply pass back to the user whatever value the exchange provides.
I’m at a crossroads—not sure which path is best.
I think I’ll finish integrating the remaining exchanges—bringing the total to four: Binance, Bybit, OKX, and Gate (Gate, for instance, uses these discount coins). Once that’s done, I’ll make a final decision. But I’m leaning toward returning the raw data exactly as the exchange provides it, and leaving the actual calculations up to the user...
- Dominant language
- Java
- Stars
- 4.1k
- Forks
- 2k
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 21
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from knowm/XChange
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
Maintainers usually reply within 2 days
-
Bug
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
knowm/XChange#5377 · 1 comment ·
Maintainers usually reply within 2 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
Maintainers usually reply within 2 days
-
Difficulty 3/5 1-2 days Newbie friendliness 52/100
knowm/XChange#5027 · 1 comment ·
Maintainers usually reply within 2 days
Similar issues
-
documentation good first issue help wanted
Difficulty 1/5 Under an hour Newbie friendliness 90/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
eclipse-sw360/sw360#4849 ·
Maintainers usually reply within 2 days
-
bug key bindings
Difficulty 2/5 1-3 hours Newbie friendliness 79/100
Maintainers usually reply within 1 day
-
Android Bug Core Drape
Difficulty 2/5 1-3 hours Newbie friendliness 77/100
organicmaps/organicmaps#14449 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
openhab/openhab-addons#22512 ·
Maintainers usually reply within 1 day