Skip to content

Instantly share code, notes, and snippets.

@benjiqq
Last active January 30, 2021 07:56
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benjiqq/4a5cc1a94f28e0803b4c46cb3314db1d to your computer and use it in GitHub Desktop.
Save benjiqq/4a5cc1a94f28e0803b4c46cb3314db1d to your computer and use it in GitHub Desktop.
trading broker spec

trading broker spec

proposal version 0.01 this is a rough spec for what a client-side trading infrastructure expects from an interface. There should be a client-side wrapper matching the hosts API. we ignore funding requests here (deposit/withdraw)

Wrapper API

private

  • submit_order. should return status and orderID and enter in order-management system.

  • cancel_order. should return status

  • get_open_orders. returns array of open orders

  • get_balance. returns dictionary of assets

  • get_account_trading_history. returns array of executions

public

  • get_orderbook

  • get_candles

  • get_markets

Sync API

synchronize the calls. can have pub/sub semantics locally

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment