Comments (4)
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.
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.
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.
#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)
- IndexError: list index out of range HOT 1
- state.interface.history duplicating prices HOT 3
- Title:Trailing Stop with limit orders in Blankly Finance paper trading environment HOT 9
- Implementing Upbit Exchange HOT 1
- Cannot run blankly login HOT 6
- Alpaca not working with crypto HOT 1
- Integrate Blankly with a timeseries database HOT 1
- Accept in memory data for backtest
- strategy.backtest without `to` argument should infer `start_time` and `end_time`
- KeyError: 'bidMultiplierUp' HOT 3
- Alpaca Cryptocurrency error(maybe just an alpaca related data error) HOT 1
- Inconsistencies in asset visualisation HOT 1
- Ow
- Innaccurate Historical Data HOT 2
- bar_event squashes price_event price HOT 1
- `state.interface.history` not returning history with correct time intervals
- `ignore_user_exceptions=False` parameter in `strategy.backtest` doesn't work
- Error installing blankly. 'ti.pxd' not found HOT 2
- Can't place bracket orders (stop-loss and take-profit) one after the other HOT 1
- Closing orders by id HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from blankly.