binance
live (futures) trading support
#519
Labels
accounting
prolly positioning: the accounting of "what/when (is) owned"
broker-backend
`brokerd`/`datad` related backend tech
brokers-can-smbz
features that suits should provide
clearing
auction and mm tech: EMS, OMS, algo-trading
config
data-layer
real-time and historical data processing and storage
feature-request
New feature or request
lurker_sponsored
Paid (or traded) for by your local anon fanbois
Somewhat monumental, this is our first lurker sponsored feature
request and task set :party:
Feat summary
As part of utilizing
piker
in a real-time event driven cryptotrading strategy (using news.treeofalpha.com) we have a request to
add live trading support in for the
binance
broker backend, firstfor their futures market and later as well for spot markets.
There actually was work done almost 2 years ago by @guilledk in
#182 which was never brought to
full completion and testing, but a lot of the initial API
integration work was prototyped to a MVP.
Obviously a lot has changed in many subsystems since then so
there will be some adjustments needed after rebase to latest main
branch.
Required base functionality:
https://dev.binance.vision/t/websocket-api-for-futures/14930
https://github.com/binance/binance-futures-connector-python
APIs:
capacity and concurrency desirables:
connectivity implementation requirements:
asks
don't error on (presumably) ephemeral network outages?
a certain sized order will clear without causing a liquidity
gap B)
techtonicdb
?we already have this in our current backend data layer
but we need to do this for the futes set right?
https://www.binance.com/en/support/faq/how-to-access-mock-trading-in-binance-futures-b3706b248f2b4b1caabb4bf253bf067f
https://www.binance.com/en/support/faq/how-to-test-my-functions-on-binance-testnet-ab78f9a1b8824cf0a106b4229c76496d
ws in
kraken
backend B)use a http API in anything that is not spot for
requests:
piker.OrderClient
API thoughwe need to add a
close_all()
helper which brings the dstasset holding / balance to net-zero.
our order mode pane but exposed through an API B)
triggered.
dark orders from our EMS we're going to need to add
an algorithm for the stop's limit-price and/or offer
simply stop-market submissions.
already doing in
piker.accounting
and friends 🏄piker.accounting
and friends 🏄This requirements section is the future nice to have / end goal
requirements and will likely require more coordination for testing
and design with the lurker sponsor 😉
load, and cache of real-time data feeds from first section above.
binance
resources:dev forum: https://dev.binance.vision/
high level FAQ:
futures:
APIs:
testnet:
https://dev.binance.vision/search?q=testnet
orders:
understanding different future type classes: COIN-margined vs. USD-margined:
spot api (which has ws ctl 💥):
history endpoints:
https://binance-docs.github.io/apidocs/websocket_api/en/#klines
recent drama (for fun):
Detailed impl TODO:
bring Binance updates #182 up to date
reorg
.brokers.binance
into subpkg like other backendsadd futures ws live feeds
FutesPair
type for handlingmkt info without having to change
Client
interface?futures contract for a pair?
finish full
emsd
based order control support for futuresand spot:
testnet setup: https://www.binance.com/en/support/faq/api-frequently-asked-questions-360004492232
we can use a reqid to tie
oid
from EMS directly to binancedialogs B)
https://github.com/binance/binance-futures-connector-python#request-id
implement rate limiting logic to avoid bans client side:
much more to come.. !
testing TODO:
binance
API submission(maybe) much more to come here!
The text was updated successfully, but these errors were encountered: