Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

binance live (futures) trading support #519

Open
4 of 36 tasks
goodboy opened this issue Jun 8, 2023 · 0 comments
Open
4 of 36 tasks

binance live (futures) trading support #519

goodboy opened this issue Jun 8, 2023 · 0 comments
Assignees
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

Comments

@goodboy
Copy link
Contributor

goodboy commented Jun 8, 2023

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 crypto
trading strategy (using news.treeofalpha.com) we have a request to
add live trading support in for the binance broker backend, first
for 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:



  • live position tracking
    • Function for getting the current balance

    • It can be either data from P2 or run in a separate thread and fetched
      from the exchange after every open/close position event.

    • IOW, balance tracking which, again, we're more or less
      already doing in piker.accounting and friends 🏄
    • Function to get price percentage change from P1

      • IOW, realtime pnl tracking and display, again we have in
        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 😉

  • real-time ticker/symbol/market name parsing and dynamic search,
    load, and cache of real-time data feeds from first section above.
    • For each symbol received from news.treeofalpha.com, immediately send
      the symbol so the code can prepare (i.e., get the price before the
      news from P1 to calculate price percentage change).


binance resources:


Detailed impl TODO:

much more to come.. !


testing TODO:

  • tests for round trip latency of live limit submissions
  • stop loss via dark orders
  • stop loss via binance API submission
  • connectivity resilience under network outage(s)
    • particularly dumping a pp if/when network returns

(maybe) much more to come here!

@goodboy goodboy self-assigned this Jun 8, 2023
@goodboy goodboy added feature-request New feature or request data-layer real-time and historical data processing and storage clearing auction and mm tech: EMS, OMS, algo-trading config broker-backend `brokerd`/`datad` related backend tech brokers-can-smbz features that suits should provide accounting prolly positioning: the accounting of "what/when (is) owned" lurker_sponsored Paid (or traded) for by your local anon fanbois labels Jun 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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
Projects
None yet
Development

No branches or pull requests

1 participant