Giter Club home page Giter Club logo

Comments (4)

EmersonDove avatar EmersonDove commented on July 17, 2024

Hmmm, nice catch -

At the current moment I'm getting a 404 at https://api.binance.us/sapi/v1/asset/tradeFee. This does look like the correct endpoint to use but I'll have to wait until they host it again before implementing (unless of course I got the URL wrong).

In the meantime I modified the decimal conversion to better match the rates at https://www.binance.us/en/fee/schedule & pushed a new release on pypi.

from blankly.

bs32g1038 avatar bs32g1038 commented on July 17, 2024

@EmersonDove

Should we consider using a global base endpoint https://api.binance.com as default?

I can find the following information form the site https://binance-docs.github.io/apidocs/spot/en/#general-info

General API Information
The base endpoint is: https://api.binance.com
If there are performance issues with the endpoint above, these API clusters are also available:
https://api1.binance.com
https://api2.binance.com
https://api3.binance.com
All endpoints return either a JSON object or array.
Data is returned in ascending order. Oldest first, newest last.
All time and timestamp related fields are in milliseconds.

Trade Fee (USER_DATA)

Response:

[
    {
        "symbol": "ADABNB",
        "makerCommission": "0.001",
        "takerCommission": "0.001"
    },
    {
        "symbol": "BNBBTC",
        "makerCommission": "0.001",
        "takerCommission": "0.001"
    }
]

GET /sapi/v1/asset/tradeFee (HMAC SHA256)

Fetch trade fee

Weight(IP): 1

Parameters:

Name Type Mandatory Description
symbol STRING NO  
recvWindow LONG NO  
timestamp LONG YES

In addition, I personally think that the trade fee may be better as a configurable parameter😀. What's your opinion?

from blankly.

EmersonDove avatar EmersonDove commented on July 17, 2024

Ah so this looks like one of the endpoints that only works for binance's com tld. We can't use those because we have to support both a domestic and international audience. I'm not sure why binance presents such a fractured API but we can only use the endpoints compatible with both websites.

As a fee setting go, there is a possibility of adding a fees parameter to the paper trade interface constructor that would be useful:
https://github.com/Blankly-Finance/Blankly/blob/ae52e5f916e1bc496300b125cfdb96f084fd531d/blankly/exchanges/interfaces/paper_trade/paper_trade.py#L24

from blankly.

bs32g1038 avatar bs32g1038 commented on July 17, 2024

#55 (comment)
If the data needs to be obtained online, the configurable trade fees parameter are not so important.
I will close this problem because it has been fixed.

from blankly.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.