How to set fees asset?

Open
#3,508 6 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
java
Domain
api, backend

Research direction

Start with the org.knowm.xchange.dto.Order class and compare its fee representation with Binance's order-update fields "n" and "N" in the linked user-data-stream documentation. Trace how order updates are converted into Order objects. Done means the fee amount and fee asset can both be retained without losing existing exchange data, with relevant tests updated or added.

Written by the indexing model from the issue text.

Description

On Binance, for instance, the fees are not necessarily paid with the one of the currencies the trade is made with.
For instance, if I buy BTC with USDT, I can pay the fees in BNB.

This information is passed in the user data stream websocket (https://github.com/binance-exchange/binance-official-api-docs/blob/master/user-data-stream.md#order-update).

When I receive the order update notification, I can read the fee amount (field "n") and the fee asset (field "N").

However, the org.knowm.xchange.dto.Order class, can only store the fee amount, not its currency. Is there a way to store this piece of information?

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from knowm/XChange

All issues in knowm/XChange

Similar issues

More Java issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.