From ff05b16b282f515a21de44e119ce1e380d4b7853 Mon Sep 17 00:00:00 2001 From: Cryptoval Trading Technologies Date: Wed, 3 Jun 2026 23:42:01 +0000 Subject: [PATCH] 20260603 --- data/apps/simulation/__SAV__/cvtt_simtest.cfg | 349 ------------------ .../__SAV__/cvtt_simtest_docker.cfg | 349 ------------------ .../__SAV__/trading_simulator.example.cfg | 112 ------ 3 files changed, 810 deletions(-) delete mode 100644 data/apps/simulation/__SAV__/cvtt_simtest.cfg delete mode 100644 data/apps/simulation/__SAV__/cvtt_simtest_docker.cfg delete mode 100644 data/apps/simulation/__SAV__/trading_simulator.example.cfg diff --git a/data/apps/simulation/__SAV__/cvtt_simtest.cfg b/data/apps/simulation/__SAV__/cvtt_simtest.cfg deleted file mode 100644 index 41d88c4..0000000 --- a/data/apps/simulation/__SAV__/cvtt_simtest.cfg +++ /dev/null @@ -1,349 +0,0 @@ -@var COORDINATOR_HOST=localhost -@var COORDINATOR_REST_PORT=28001 -@var COORDINATOR_WS_PORT=28002 - -@var GLOBAL_CHANNEL_PREFIX=CVTT_MU_SIM - -@var SIM_HOST=localhost -@var SIM_DATA_DIR=/home/oleg/develop/simulation/data - -@var SIM_MD_WS_PORT=28080 -@var SIM_OE_WS_PORT=28081 -@var SIM_OE_REST_PORT=28082 -@var SIM_AC_REST_PORT=28083 - - -{ - # --------------------------------------- - "__dummy__": null - # --------------------------------------- - # Overwriting "exchanges" part in "refdata" - # "refdata": @inc=http://@env{CONFIG_SERVICE}/refdata/refdata - "refdata": { - "assets": @inc=http://@env{CONFIG_SERVICE}/refdata/assets , - "instruments": @inc=http://@env{CONFIG_SERVICE}/refdata/instruments , - "exchange_instruments": @inc=http://@env{CONFIG_SERVICE}/refdata/exchange_instruments , - "dynamic_instrument_exchanges": ["ALPACA"], - "exchanges": { - "SIM_COINBASE": { - "exchange_id": "COINBASE", - "name": "Coinbase Advanced Trade (Simulation)", - "type": "SPOT", - - "mktdata" : { - "class": "cvttpy.exchanges.mkt_simulator.md_client.MktSimMdClientFeed" - "api": @pathptr=simulation/market_simulator/market_data/api - }, - "order_entry": { - "class": "cvttpy.exchanges.mkt_simulator.oe_client.MarketSimulatorOEClient" - "api": @ptrpath=simulation/market_simulator/order_entry/api - }, - "accounting": { - "class": "cvttpy.exchanges.mkt_simulator.acct_client.MktSimAccounting" - "api": @ptrpath=simulation/market_simulator/accounting/api - }, - }, - "SIM_ALPACA": { - "exchange_id": "ALPACA", - "name": "Alpaca Trading", - "type": "EQUITY", - - "mktdata" : { - "class": "cvttpy.exchanges.mkt_simulator.md_client.MktSimMdClientFeed" - "config_key": "simulation/market_simulator/market_data/api" - }, - "order_entry": { - "class": "cvttpy.exchanges.mkt_simulator.oe_client.MarketSimulatorOEClient" - "config_key": "simulation/market_simulator/order_entry/api" - }, - "accounting": { - "class": "cvttpy.exchanges.mkt_simulator.acct_client.MktSimAccounting" - "config_key": "simulation/market_simulator/accounting/api" - } - }, - } - }, - "comm": @inc=http://@env{CONFIG_SERVICE}/apps/common/comm , - "algos": @inc=http://@env{CONFIG_SERVICE}/apps/common/algos , - "strategies": @inc=http://@env{CONFIG_SERVICE}/apps/common/strategies , - "risk_strategies": @inc=http://@env{CONFIG_SERVICE}/apps/common/risk_strategies , - - "comm_settings": "@env{CONFIG_COMM_SETTINGS}", - "global_channel_prefix": "${GLOBAL_CHANNEL_PREFIX}", - - "simulation": { - # "speed_factor": 1.0, - "speed_factor": 0.0 - , "time_events_interval_ms": 0 - , "simtime_file": "${SIM_DATA_DIR}/simtime.bin" - , "expected_consumers": [ - "md_gateway", - "mkt_gateway_tester" - "coordinator", - # "oe_gateway", - # "acct_gateway", - # "quant", - # "trader", - # "bookkeeper", - # "risk_manager", - # "pricer" - ] - , "consumer_timeout_sec": 30.0 - - , "market_simulator" : { - "initial_positions": { - "exchange": "COINBASE", - "assets": { - "BTC": 0.5 - , "ETH": 0.0 - , "USD": 10_000.0 - } - } - , "market_data": { - "sources": [ - { - "loader_class": "cvttpy.trading.mkt_data.time_series.loaders.sqlite_loader.SqliteMdLoader" - , "file_name": "${SIM_DATA_DIR}/20250422.CNBS.BTC_USD.db" - , "table_name": "md_trades" - , "columns": [ - "tstamp" - , "tstamp_ns as tm" # must have tm for DataFrame - , "tstamp_ns as local_time_ns" # must have for simrunner - , "exchange_id" - , "instrument_id" - , "px as price" - , "qty as quantity" - , "trade_id" - , "condition as aggressor_side" - , "condition as taker_side" - ] - , "time_column": "tstamp" - , "exchange_id": "COINBASE" - , "instruments": ["PAIR-BTC-USD"] - , "md_type": "TRADES" - } - # , { - # "loader_class": "cvttpy.trading.mkt_data.time_series.loaders.tsdb_loader.TimescaleTSLoader" - # , "credentials_key": "TSDB_MD_CVTTDATA_RO" - # , "interval": ${INTERVAL} - # , "from_time": ${FROM_TIME} #"2024-10-03 09:00:00" - # , "exchange_id": "COINBASE" - # , "instruments": ["PAIR-BTC-USD"] - # , "md_type": "BOOK_TOP" - # , "table_name": "coinbase.md_booktops" - # , "columns": [ - # "time", - # "local_time_ns", - # "exchange_id", - # "instrument_id", - # "bid_price", - # "bid_quantity", - # "ask_price", - # "ask_quantity", - # "'BT' as type", - # ] - # , "time_column": "time" - # } - ] - , "api": { - "web_socket": { - "url": "ws://${SIM_HOST}:${SIM_MD_WS_PORT}/ws" - } - } - } - , "order_entry": { - "execution": { - "execute_on": ["BOOK_TOP", "TRADES"] - "top_only": true - ,"min_order_age_sec": 0.1 - , "pricing_method": "BY_MKT_TRD_PRICE_BY_TRADE" - - , "short_sale_allowed": false - , "fee_schedule": { - "taker_fee_rate": 0.006 - "maker_fee_rate": 0.004 - } - # , "presubscribe_md_types": ["BOOK_TOP", "TRADES"] - } - , "api": { - "web_socket": { - "url": "ws://${SIM_HOST}:${SIM_OE_WS_PORT}/ws" - } - , "REST": { - "port": ${SIM_OE_REST_PORT}, - "base_url": "http://${SIM_HOST}:${SIM_OE_REST_PORT}", - "endpoints": { - "new_order": ["POST", "/order"], - "cancel_order": ["POST", "/cancel"], - "cancel_all": ["POST", "/cancel_all"], - "open_orders": ["GET", "/open_orders"], - "order_status": ["GET", "/order_status"] - } - } - } - } - , "accounting": { - "api": { - "REST": { - "port": ${SIM_AC_REST_PORT}, - "base_url": "http://${SIM_HOST}:${SIM_AC_REST_PORT}", - "endpoints": { - "positions": ["GET", "/positions"] - "trades": ["GET", "/trades"] - - } - - } - } - } - } - , "external_participants": [ - { - "class": "cvttpy.apps.trading_simulator.participants.external_strategy.ExternalStrategySim" - "params": { - "reader": { - "source": "file://${SIM_DATA_DIR}/trading_instructions.json" - } - "listener": { - "book_id": "TESTBK_COINBS_01", - "strategy_id": "DUMMY_STRATEGY" - } - } - } - ] - } - - , "coordinator": { - "api": { - "REST": { - "port": ${COORDINATOR_REST_PORT}, - "base_url": ["POST", "http://${COORDINATOR_HOST}:${COORDINATOR_REST_PORT}"], - } - , "WS": { - "url": "ws://${COORDINATOR_HOST}:${COORDINATOR_WS_PORT}/ws" - } - } - } - , "market_data_gateway": { - "exchanges_settings": { - "*": { - "mkt_data": { - "enabled": true - , "streaming": true - }, - "order_entry": { - "enabled": false - , "streaming": false - }, - "accounting": { - "enabled": false - , "streaming": false - }, - }, - } - , "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.MD_GW" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.MD_GW_APP_STATUS" - , "exchanges": [ - "SIM_COINBASE" - ], - "presubscribe": [ - "COINBASE:PAIR-BTC-USD" - ] - } - , "order_entry_gateway": { - "exchanges_settings": { - "ALPACA_SNDBX": { - "mkt_data": { - "enabled": false - , "streaming": false - }, - "order_entry": { - "enabled": true - , "streaming": true - }, - "accounting": { - "enabled": false - , "streaming": false - } - , "credentials_key": { - "read_only": "ALPACA_SANDBOX" - , "trade": "ALPACA_SANDBOX" - } - } - } - , "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.OE_GW" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.OE_GW_APP_STATUS" - , "exchanges": [ - "SIM_COINBASE" - ] - } - , "accounting_gateway": { - "exchanges_settings": { - "ALPACA_SNDBX": { - "mkt_data": { - "enabled": false - , "streaming": false - }, - "order_entry": { - "enabled": false - , "streaming": false - }, - "accounting": { - "enabled": true - , "streaming": false - } - , "credentials_key": { - "read_only": "ALPACA_SANDBOX" - , "trade": "ALPACA_SANDBOX" - } - }, - "COINBASE_AT": { - "mkt_data": { - "enabled": false - , "streaming": false - }, - "order_entry": { - "enabled": false - , "streaming": false - }, - "accounting": { - "enabled": true - , "streaming": false - } - , "credentials_key": { - "read_only": "COINBASE_ADV_RO" - } - } - } - , "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.ACCT_GW" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.ACCT_GW_APP_STATUS" - , "exchanges": [ - "SIM_COINBASE" - ] - } - , "quant": { - "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.QUANT" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.QUANT_MUSVC_STATUS" - } - , "trader": { - "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.TRADER" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.TRADER_MUSVC_STATUS" - } - , "bookkeeper": { - "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.BKPR" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.BKPR_MUSVC_STATUS" - , "db": { - "server_type": "timescale", - "cred_key": "TSDB_TRADING_CVTT_TESTDB" - } - } - , "risk_manager": { - "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.RMGR" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.RMGR_MUSVC_STATUS" - , "revalue_interval_sec": 10.5 - } - , "pricer": { - "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.PXER" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.PXER_MUSVC_STATUS" - } -} diff --git a/data/apps/simulation/__SAV__/cvtt_simtest_docker.cfg b/data/apps/simulation/__SAV__/cvtt_simtest_docker.cfg deleted file mode 100644 index 41d88c4..0000000 --- a/data/apps/simulation/__SAV__/cvtt_simtest_docker.cfg +++ /dev/null @@ -1,349 +0,0 @@ -@var COORDINATOR_HOST=localhost -@var COORDINATOR_REST_PORT=28001 -@var COORDINATOR_WS_PORT=28002 - -@var GLOBAL_CHANNEL_PREFIX=CVTT_MU_SIM - -@var SIM_HOST=localhost -@var SIM_DATA_DIR=/home/oleg/develop/simulation/data - -@var SIM_MD_WS_PORT=28080 -@var SIM_OE_WS_PORT=28081 -@var SIM_OE_REST_PORT=28082 -@var SIM_AC_REST_PORT=28083 - - -{ - # --------------------------------------- - "__dummy__": null - # --------------------------------------- - # Overwriting "exchanges" part in "refdata" - # "refdata": @inc=http://@env{CONFIG_SERVICE}/refdata/refdata - "refdata": { - "assets": @inc=http://@env{CONFIG_SERVICE}/refdata/assets , - "instruments": @inc=http://@env{CONFIG_SERVICE}/refdata/instruments , - "exchange_instruments": @inc=http://@env{CONFIG_SERVICE}/refdata/exchange_instruments , - "dynamic_instrument_exchanges": ["ALPACA"], - "exchanges": { - "SIM_COINBASE": { - "exchange_id": "COINBASE", - "name": "Coinbase Advanced Trade (Simulation)", - "type": "SPOT", - - "mktdata" : { - "class": "cvttpy.exchanges.mkt_simulator.md_client.MktSimMdClientFeed" - "api": @pathptr=simulation/market_simulator/market_data/api - }, - "order_entry": { - "class": "cvttpy.exchanges.mkt_simulator.oe_client.MarketSimulatorOEClient" - "api": @ptrpath=simulation/market_simulator/order_entry/api - }, - "accounting": { - "class": "cvttpy.exchanges.mkt_simulator.acct_client.MktSimAccounting" - "api": @ptrpath=simulation/market_simulator/accounting/api - }, - }, - "SIM_ALPACA": { - "exchange_id": "ALPACA", - "name": "Alpaca Trading", - "type": "EQUITY", - - "mktdata" : { - "class": "cvttpy.exchanges.mkt_simulator.md_client.MktSimMdClientFeed" - "config_key": "simulation/market_simulator/market_data/api" - }, - "order_entry": { - "class": "cvttpy.exchanges.mkt_simulator.oe_client.MarketSimulatorOEClient" - "config_key": "simulation/market_simulator/order_entry/api" - }, - "accounting": { - "class": "cvttpy.exchanges.mkt_simulator.acct_client.MktSimAccounting" - "config_key": "simulation/market_simulator/accounting/api" - } - }, - } - }, - "comm": @inc=http://@env{CONFIG_SERVICE}/apps/common/comm , - "algos": @inc=http://@env{CONFIG_SERVICE}/apps/common/algos , - "strategies": @inc=http://@env{CONFIG_SERVICE}/apps/common/strategies , - "risk_strategies": @inc=http://@env{CONFIG_SERVICE}/apps/common/risk_strategies , - - "comm_settings": "@env{CONFIG_COMM_SETTINGS}", - "global_channel_prefix": "${GLOBAL_CHANNEL_PREFIX}", - - "simulation": { - # "speed_factor": 1.0, - "speed_factor": 0.0 - , "time_events_interval_ms": 0 - , "simtime_file": "${SIM_DATA_DIR}/simtime.bin" - , "expected_consumers": [ - "md_gateway", - "mkt_gateway_tester" - "coordinator", - # "oe_gateway", - # "acct_gateway", - # "quant", - # "trader", - # "bookkeeper", - # "risk_manager", - # "pricer" - ] - , "consumer_timeout_sec": 30.0 - - , "market_simulator" : { - "initial_positions": { - "exchange": "COINBASE", - "assets": { - "BTC": 0.5 - , "ETH": 0.0 - , "USD": 10_000.0 - } - } - , "market_data": { - "sources": [ - { - "loader_class": "cvttpy.trading.mkt_data.time_series.loaders.sqlite_loader.SqliteMdLoader" - , "file_name": "${SIM_DATA_DIR}/20250422.CNBS.BTC_USD.db" - , "table_name": "md_trades" - , "columns": [ - "tstamp" - , "tstamp_ns as tm" # must have tm for DataFrame - , "tstamp_ns as local_time_ns" # must have for simrunner - , "exchange_id" - , "instrument_id" - , "px as price" - , "qty as quantity" - , "trade_id" - , "condition as aggressor_side" - , "condition as taker_side" - ] - , "time_column": "tstamp" - , "exchange_id": "COINBASE" - , "instruments": ["PAIR-BTC-USD"] - , "md_type": "TRADES" - } - # , { - # "loader_class": "cvttpy.trading.mkt_data.time_series.loaders.tsdb_loader.TimescaleTSLoader" - # , "credentials_key": "TSDB_MD_CVTTDATA_RO" - # , "interval": ${INTERVAL} - # , "from_time": ${FROM_TIME} #"2024-10-03 09:00:00" - # , "exchange_id": "COINBASE" - # , "instruments": ["PAIR-BTC-USD"] - # , "md_type": "BOOK_TOP" - # , "table_name": "coinbase.md_booktops" - # , "columns": [ - # "time", - # "local_time_ns", - # "exchange_id", - # "instrument_id", - # "bid_price", - # "bid_quantity", - # "ask_price", - # "ask_quantity", - # "'BT' as type", - # ] - # , "time_column": "time" - # } - ] - , "api": { - "web_socket": { - "url": "ws://${SIM_HOST}:${SIM_MD_WS_PORT}/ws" - } - } - } - , "order_entry": { - "execution": { - "execute_on": ["BOOK_TOP", "TRADES"] - "top_only": true - ,"min_order_age_sec": 0.1 - , "pricing_method": "BY_MKT_TRD_PRICE_BY_TRADE" - - , "short_sale_allowed": false - , "fee_schedule": { - "taker_fee_rate": 0.006 - "maker_fee_rate": 0.004 - } - # , "presubscribe_md_types": ["BOOK_TOP", "TRADES"] - } - , "api": { - "web_socket": { - "url": "ws://${SIM_HOST}:${SIM_OE_WS_PORT}/ws" - } - , "REST": { - "port": ${SIM_OE_REST_PORT}, - "base_url": "http://${SIM_HOST}:${SIM_OE_REST_PORT}", - "endpoints": { - "new_order": ["POST", "/order"], - "cancel_order": ["POST", "/cancel"], - "cancel_all": ["POST", "/cancel_all"], - "open_orders": ["GET", "/open_orders"], - "order_status": ["GET", "/order_status"] - } - } - } - } - , "accounting": { - "api": { - "REST": { - "port": ${SIM_AC_REST_PORT}, - "base_url": "http://${SIM_HOST}:${SIM_AC_REST_PORT}", - "endpoints": { - "positions": ["GET", "/positions"] - "trades": ["GET", "/trades"] - - } - - } - } - } - } - , "external_participants": [ - { - "class": "cvttpy.apps.trading_simulator.participants.external_strategy.ExternalStrategySim" - "params": { - "reader": { - "source": "file://${SIM_DATA_DIR}/trading_instructions.json" - } - "listener": { - "book_id": "TESTBK_COINBS_01", - "strategy_id": "DUMMY_STRATEGY" - } - } - } - ] - } - - , "coordinator": { - "api": { - "REST": { - "port": ${COORDINATOR_REST_PORT}, - "base_url": ["POST", "http://${COORDINATOR_HOST}:${COORDINATOR_REST_PORT}"], - } - , "WS": { - "url": "ws://${COORDINATOR_HOST}:${COORDINATOR_WS_PORT}/ws" - } - } - } - , "market_data_gateway": { - "exchanges_settings": { - "*": { - "mkt_data": { - "enabled": true - , "streaming": true - }, - "order_entry": { - "enabled": false - , "streaming": false - }, - "accounting": { - "enabled": false - , "streaming": false - }, - }, - } - , "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.MD_GW" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.MD_GW_APP_STATUS" - , "exchanges": [ - "SIM_COINBASE" - ], - "presubscribe": [ - "COINBASE:PAIR-BTC-USD" - ] - } - , "order_entry_gateway": { - "exchanges_settings": { - "ALPACA_SNDBX": { - "mkt_data": { - "enabled": false - , "streaming": false - }, - "order_entry": { - "enabled": true - , "streaming": true - }, - "accounting": { - "enabled": false - , "streaming": false - } - , "credentials_key": { - "read_only": "ALPACA_SANDBOX" - , "trade": "ALPACA_SANDBOX" - } - } - } - , "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.OE_GW" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.OE_GW_APP_STATUS" - , "exchanges": [ - "SIM_COINBASE" - ] - } - , "accounting_gateway": { - "exchanges_settings": { - "ALPACA_SNDBX": { - "mkt_data": { - "enabled": false - , "streaming": false - }, - "order_entry": { - "enabled": false - , "streaming": false - }, - "accounting": { - "enabled": true - , "streaming": false - } - , "credentials_key": { - "read_only": "ALPACA_SANDBOX" - , "trade": "ALPACA_SANDBOX" - } - }, - "COINBASE_AT": { - "mkt_data": { - "enabled": false - , "streaming": false - }, - "order_entry": { - "enabled": false - , "streaming": false - }, - "accounting": { - "enabled": true - , "streaming": false - } - , "credentials_key": { - "read_only": "COINBASE_ADV_RO" - } - } - } - , "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.ACCT_GW" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.ACCT_GW_APP_STATUS" - , "exchanges": [ - "SIM_COINBASE" - ] - } - , "quant": { - "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.QUANT" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.QUANT_MUSVC_STATUS" - } - , "trader": { - "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.TRADER" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.TRADER_MUSVC_STATUS" - } - , "bookkeeper": { - "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.BKPR" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.BKPR_MUSVC_STATUS" - , "db": { - "server_type": "timescale", - "cred_key": "TSDB_TRADING_CVTT_TESTDB" - } - } - , "risk_manager": { - "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.RMGR" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.RMGR_MUSVC_STATUS" - , "revalue_interval_sec": 10.5 - } - , "pricer": { - "channel_prefix": "${GLOBAL_CHANNEL_PREFIX}.PXER" - , "app_status_channel": "${GLOBAL_CHANNEL_PREFIX}.PXER_MUSVC_STATUS" - } -} diff --git a/data/apps/simulation/__SAV__/trading_simulator.example.cfg b/data/apps/simulation/__SAV__/trading_simulator.example.cfg deleted file mode 100644 index 37e5e9f..0000000 --- a/data/apps/simulation/__SAV__/trading_simulator.example.cfg +++ /dev/null @@ -1,112 +0,0 @@ - -{ - "simulation": { - "market_simulator": { - "initial_positions": { - "exchange": "COINBASE", - "assets": { - "BTC": 0.1, - "ETH": 5.0, - "USD": 10000.0 - } - }, - "market_data": { - "sources": [ - { - "loader_class": "cvttpy_trading.trading.mkt_data.time_series.loaders.sqlite_loader.SqliteMdLoader", - "file_name": "/path/to/market_data.db", - "table_name": "md_trades", - "columns": [ - "tstamp", - "tstamp_ns as tm", - "tstamp_ns as local_time_ns", - "exchange_id", - "instrument_id", - "px as price", - "qty as quantity", - "trade_id", - "condition as aggressor_side", - "condition as taker_side" - ], - "time_column": "tstamp", - "exchange_id": "COINBASE", - "instruments": [ - "PAIR-BTC-USD" - ], - "md_type": "TRADES" - }, - { - "loader_class": "cvttpy_trading.trading.mkt_data.time_series.loaders.sqlite_loader.SqliteMdLoader", - "file_name": "/path/to/market_data.db", - "table_name": "md_booktops", - "columns": [ - "tstamp", - "tstamp_ns as tm", - "tstamp_ns as local_time_ns", - "exchange_id", - "instrument_id", - "bid_price", - "bid_quantity", - "ask_price", - "ask_quantity" - ], - "time_column": "tstamp", - "exchange_id": "COINBASE", - "instruments": [ - "PAIR-BTC-USD" - ], - "md_type": "BOOK_TOP" - } - ], - "api": { - "web_socket": { - "url": "ws://localhost:28080/ws" - } - } - }, - "order_entry": { - "execution": { - "execute_on": [ - "BOOK_TOP", - "TRADES" - ], - "top_only": true, - "pricing_method": "BY_MKT_TRD_PRICE_BY_TRADE", - "min_order_age_sec": 0.1, - "fee_schedule": { - "taker_fee_rate": 0.006, - "maker_fee_rate": 0.004 - } - }, - "api": { - "web_socket": { - "url": "ws://localhost:28081/ws" - }, - "REST": { - "port": 28082, - "base_url": "http://localhost:28082", - "endpoints": { - "new_order": ["POST", "/order"], - "cancel_order": ["POST", "/cancel"], - "cancel_all": ["POST", "/cancel_all"], - "open_orders": ["GET", "/open_orders"], - "order_status": ["GET", "/order_status"] - } - } - } - }, - "accounting": { - "api": { - "REST": { - "port": 28083, - "base_url": "http://localhost:28083", - "endpoints": { - "positions": ["GET", "/positions"], - "trades": ["GET", "/trades"] - } - } - } - } - } - } -}