From 2fc1d30bf1040cf8de7b3bf567a417fd55928ef7 Mon Sep 17 00:00:00 2001 From: John Colvin Date: Thu, 20 Feb 2025 20:36:17 +0000 Subject: [PATCH] Add binance_usds_futures_testnet config profile To activate this config profile, run: tools/sparkd_profile.sh binance_usds_futures_testnet --- .../binance_dev/binance_usds_futures_1.json | 8 + .../config/profiles/binance_dev/spark.conf | 169 ++++++++++++++++++ 2 files changed, 177 insertions(+) create mode 100755 src/lib/config/profiles/binance_dev/binance_usds_futures_1.json create mode 100644 src/lib/config/profiles/binance_dev/spark.conf diff --git a/src/lib/config/profiles/binance_dev/binance_usds_futures_1.json b/src/lib/config/profiles/binance_dev/binance_usds_futures_1.json new file mode 100755 index 000000000..3315bfb58 --- /dev/null +++ b/src/lib/config/profiles/binance_dev/binance_usds_futures_1.json @@ -0,0 +1,8 @@ +{ + "api_key": "b838c108cd2648e34a4f088a7fc635a9cbccf3c2faa6bcaabcb532ffacc087b0", + "secret_key": "a68f0ab27403c42fa0306b6341b2ddd51d99ac42916f849404155449457d0492", + "account": "b838c108", + "rest_endpoint": "https://testnet.binancefuture.com", + "ws_endpoint": "wss://testnet.binancefuture.com/ws-fapi/v1", + "ws_stream_endpoint": "wss://stream.binancefuture.com" +} diff --git a/src/lib/config/profiles/binance_dev/spark.conf b/src/lib/config/profiles/binance_dev/spark.conf new file mode 100644 index 000000000..53e683c57 --- /dev/null +++ b/src/lib/config/profiles/binance_dev/spark.conf @@ -0,0 +1,169 @@ +ExchangeSubAccounts { + value { + accounts { + exchange_subaccount: "b838c108" + bts_account_name: "BINANCE_DEV" + } + accounts{ + exchange_subaccount: "ZmIKL6fb" + bts_account_name: "MAIN" + } + accounts{ + exchange_subaccount: "v1iSzZrY" + bts_account_name: "SMALL" + } + } +} + +JetFIX { + value { + connection { + name: "binance_1" + max_order_msgs_per_window: 300 + venue: VENUE_BINANCE + } + connection { + name: "binance_usds_futures_1" + max_order_msgs_per_window: 300 + venue: VENUE_BINANCE_USDS_FUTURES + } + } +} + +PublisherOptions { + value { + network_interface: "0.0.0.0" + heartbeat_ms: 5000 + heartbeat_boot_seconds: 60 + skip_options: true + hot_initial: 1024 + hot_growth: 1024 + cold_initial: 8192 + cold_growth: 2048 + channel_prefix: "" + disable_heartbeat: true + } +} + +Logging { + value { + initial_queue_size: 120001 + max_queue_growth: 4 + console { + default_level: "Warn" + subsystem { + name: "OrderMan" + level: "Diag" + } + subsystem { + name: "Http" + level: "Diag" + } + } + file { + default_level: "Info" + subsystem { + name: "md" + level: "Diag" + } + subsystem { + name: "OrderMan" + level: "Diag" + } + subsystem { + name: "Http" + level: "Diag" + } + } + } +} + +MarketDataConfig { + value { + binance { + num_depth_levels: 5 + # url_rest_base: "https://fapi.binance.com" + # url_ws_base: "wss://fstream.binance.com" + url_rest_base: "https://testnet.binance.vision" + url_ws_base: "wss://testnet.binance.vision" + + security_criteria { + clauses { + security_types: SECURITY_TYPE_SPOT + symbols: "AAVE" + symbols: "AVAX" + symbols: "BNB" + symbols: "BTC" + symbols: "DOGE" + symbols: "EIGEN" + symbols: "ETH" + } + } + } + binance_usds_futures { + num_depth_levels: 5 + # url_rest_base: "https://fapi.binance.com" + # url_ws_base: "wss://fstream.binance.com" + url_rest_base: "https://testnet.binancefuture.com" + url_ws_base: "wss://stream.binancefuture.com" + + security_criteria { + clauses { + security_types: SECURITY_TYPE_FUTURE + symbols: "AAVE" + symbols: "AVAX" + symbols: "BNB" + symbols: "BTC" + symbols: "DOGE" + symbols: "EIGEN" + symbols: "ETH" + } + } + } + } +} + +Symbols { + value { + venues { + name: "VENUE_BINANCE" + spot: "AAVE" + spot: "AVAX" + spot: "BNB" + spot: "BTC" + spot: "DOGE" + spot: "EIGEN" + spot: "ETH" + } + venues { + name: "VENUE_BINANCE_USDS_FUTURES" + future: "AAVE" + future: "AVAX" + future: "BNB" + future: "BTC" + future: "DOGE" + future: "EIGEN" + future: "ETH" + } + } +} + +NotSimExecution { + value { + entries { + venue: VENUE_BINANCE + } + entries { + venue: VENUE_BINANCE_USDS_FUTURES + } + entries { + venue: VENUE_GLBX + } + entries { + venue: VENUE_OKX + } + entries { + venue: VENUE_TAIFEX + } + } +}