From 614f1c00c5b88cec14753071775050d8fc977f52 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 9 Oct 2025 18:25:50 -0400 Subject: [PATCH] Bump `brokers.toml`, update ib and deribit sections For `[ib]` adjust content to match changes to the `dockering/ib/README.rst` and for `[deribit]` toss in the WIP options related params for anyone who wants to play around with @nt's work. --- config/brokers.toml | 77 +++++++++++++++++++++++++++++---------------- 1 file changed, 50 insertions(+), 27 deletions(-) diff --git a/config/brokers.toml b/config/brokers.toml index 42df5a3e..098a940c 100644 --- a/config/brokers.toml +++ b/config/brokers.toml @@ -1,6 +1,5 @@ -################ # ---- CEXY ---- -################ + [binance] accounts.paper = 'paper' @@ -13,28 +12,41 @@ accounts.spot = 'spot' spot.use_testnet = false spot.api_key = '' spot.api_secret = '' +# ------ binance ------ [deribit] +# std assets key_id = '' key_secret = '' +# options +accounts.option = 'option' +option.use_testnet = false +option.key_id = '' +option.key_secret = '' +# aux logging from `cryptofeed` +option.log.filename = 'cryptofeed.log' +option.log.level = 'DEBUG' +option.log.disabled = true +# ------ deribit ------ [kraken] key_descr = '' api_key = '' secret = '' +# ------ kraken ------ [kucoin] key_id = '' key_secret = '' key_passphrase = '' +# ------ kucoin ------ -################ # -- BROKERZ --- -################ + [questrade] refresh_token = '' access_token = '' @@ -42,44 +54,55 @@ api_server = 'https://api06.iq.questrade.com/' expires_in = 1800 token_type = 'Bearer' expires_at = 1616095326.355846 +# ------ questrade ------ [ib] +# define the (set of) host-port socketaddrs that +# brokerd.ib will scan to connect to an API endpoint +# (ib-gw or ib-tws listening instances) hosts = [ '127.0.0.1', ] -# XXX: the order in which ports will be scanned -# (by the `brokerd` daemon-actor) -# is determined # by the line order here. -# TODO: when we eventually spawn gateways in our -# container, we can just dynamically allocate these -# using IBC. ports = [ 4002, # gw 7497, # tws ] -# XXX: for a paper account the flex web query service -# is not supported so you have to manually download -# and XML report and put it in a location that can be -# accessed by the ``brokerd.ib`` backend code for parsing. -flex_token = '' -flex_trades_query_id = '' # live account - -# when clients are being scanned this determines -# which clients are preferred to be used for data -# feeds based on the order of account names, if -# detected as active on an API client. +# When API endpoints are being scanned durin startup, the order +# of user-defined-account "names" (as defined below) here +# determines which py-client connection is given priority to be +# used for data-feed-requests by according to whichever client +# connected to an API endpoing which reported the equivalent +# account number for that name. prefer_data_account = [ 'paper', 'margin', 'ira', ] +# For long-term trades txn (transaction) history +# processing (i.e your txn ledger with IB) you can +# (automatically for live accounts) query the FLEX +# report system for past history. +# +# (For paper accounts the web query service +# is not supported so you have to manually download +# an XML report and put it in a location that can be +# accessed by our `brokerd.ib` backend code for parsing). +# +flex_token = '' +flex_trades_query_id = '' # live account + +# define "aliases" (names) for each account number +# such that the names can be reffed and logged throughout +# `piker.accounting` subsys and more easily +# referred to by the user. +# +# These keys will be the set exposed through the order-mode +# account-selection UI so that numbers are never shown. [ib.accounts] -# the order in which accounts will be selectable -# in the order mode UI (if found via clients during -# API-app scanning)when a new symbol is loaded. -paper = 'XX0000000' -margin = 'X0000000' -ira = 'X0000000' +paper = 'DU0000000' # <- literal account # +margin = 'U0000000' +ira = 'U0000000' +# ------ ib ------