diff --git a/data/admin/cvtt_hosts.cfg b/data/admin/cvtt_hosts.cfg index 15b4b95..ea62d5a 100644 --- a/data/admin/cvtt_hosts.cfg +++ b/data/admin/cvtt_hosts.cfg @@ -110,12 +110,24 @@ "docker": "true", "gui": "true", }, + "cvtt-write": { + "type": "vm", + "users": ["oleg"], + "docker": "true", + "gui": "true", + }, "desktop": { "type": "vm", "users": ["oleg"], "docker": "false", "gui": "true", }, + "home-fin": { + "type": "vm", + "users": ["oleg"], + "docker": "false", + "gui": "true", + }, // -- Headless "cvtt-build": { diff --git a/data/admin/docker_images.cfg b/data/admin/docker_images.cfg index 7714f47..9da9cd8 100644 --- a/data/admin/docker_images.cfg +++ b/data/admin/docker_images.cfg @@ -17,4 +17,10 @@ "based_on_project": "cvttpy" # "additional_projects": [] } + , "Crypto Daily MD": { + "image_name": "crypto_md_day", + "docker_dev_path": "market_data/crypto_md_day", + "based_on_project": "ops" + # "additional_projects": [] + } } \ No newline at end of file diff --git a/data/apps/research/cointegration_trader.cfg b/data/apps/research/cointegration_trader.cfg new file mode 100644 index 0000000..71a4909 --- /dev/null +++ b/data/apps/research/cointegration_trader.cfg @@ -0,0 +1,50 @@ +@var CONFIG_SERVICE=cloud23.cvtt.vpn:6789 +{ + "refdata": @inc=http://${CONFIG_SERVICE}/refdata/refdata + , "comm": @inc=http://${CONFIG_SERVICE}/apps/common/comm + , "algos": @inc=http://${CONFIG_SERVICE}/apps/common/algos + , "exchanges_settings": { + "ALPACA_SIM": { + "mkt_data": { + "enabled": true + , "streaming": true + }, + "order_entry": { + "enabled": true + , "streaming": true + }, + "accounting": { + "enabled": true + , "streaming": false + }, + }, + # "ALPACA-MD-REST-ONLY": { + # "mkt_data": { + # "enabled": true + # , "streaming": false + # }, + # }, + # "COINBASE_SIM": { + # "mkt_data": { + # "enabled": true + # , "streaming": true + # }, + # "order_entry": { + # "enabled": true + # , "streaming": true + # }, + # "accounting": { + # "enabled": true + # , "streaming": false + # }, + # }, + + } + , "trading": { + "book_id": "COINTEGR_BOOK_001" + ,"algo": "TRDALGO_SIMPLE_BO" + , "usd_amount": 1000.0 + , "price_offset_bps": 20 + } +} + diff --git a/data/apps/research/mkt_simulator_eqt.cfg b/data/apps/research/mkt_simulator_eqt.cfg index e0dd677..e036a24 100644 --- a/data/apps/research/mkt_simulator_eqt.cfg +++ b/data/apps/research/mkt_simulator_eqt.cfg @@ -8,6 +8,8 @@ @var ACCT_REST_PORT=10083 @var DATE=20241114 +@var FROM_TIME=13:30 +@var TO_TIME=20:00 { "refdata": @inc=http://${CONFIG_SERVICE}/refdata/refdata @@ -15,8 +17,8 @@ , "comm": @inc=http://${CONFIG_SERVICE}/apps/common/comm , "comm_settings": "/comm/pubsub/redis/localhost" , "simulation": { - # "speed_factor": 1.0, "speed_factor": 0.0, + # "speed_factor": 1000.0, "time_events_interval_ms": 0 } , "market_simulator" : { @@ -32,7 +34,7 @@ "sources": [ { "loader_class": "cvttpy.trading.mkt_data.time_series.loaders.sqlite_loader.SqliteMdLoader" - , "file_name": "${DATA_DIR}/eqty/${DATE}.alpaca_sim_md.db" + , "file_name": "${DATA_DIR}/eqt/${DATE}.alpaca_sim_md.db" , "exchange_id": "ALPACA" , "instruments": ["STOCK-COIN", "STOCK-CAN"] , "md_types": { @@ -54,6 +56,8 @@ , "tape" ] , "time_column": "tstamp" + , "from_time": "${FROM_TIME}" + , "to_time": "${TO_TIME}" } , "BOOK_TOP": { "table_name": "md_quotes" @@ -71,6 +75,8 @@ , "ask_qty as ask_quantity" ] , "time_column": "tstamp" + , "from_time": "${FROM_TIME}" + , "to_time": "${TO_TIME}" } # , "HIST_BAR": { # "table_name": "md_1min_bars" diff --git a/data/apps/tests/get_positions.cfg b/data/apps/tests/get_positions.cfg index 42363c2..8c3dae1 100644 --- a/data/apps/tests/get_positions.cfg +++ b/data/apps/tests/get_positions.cfg @@ -21,6 +21,15 @@ "read_only": "ALPACA_SANDBOX" } } + , "ALPACA_PROD": { + "accounting": { + "enabled": true + , "streaming": false + } + , "credentials_key": { + "read_only": "ALPACA_PROD" + } + } , "GEMINI-SNDBX": { "accounting": { "enabled": true diff --git a/data/apps/tests/get_trades.cfg b/data/apps/tests/get_trades.cfg index 0ae4a71..e39a71f 100644 --- a/data/apps/tests/get_trades.cfg +++ b/data/apps/tests/get_trades.cfg @@ -21,8 +21,16 @@ "read_only": "ALPACA_SANDBOX" } } + , "ALPACA_PROD": { + "accounting": { + "enabled": true + , "streaming": false + } + , "credentials_key": { + "read_only": "ALPACA_PROD" + } + } } , "refdata": @inc=http://${CONFIG_SERVICE}/refdata/refdata - , "comm": @inc=http://${CONFIG_SERVICE}/apps/common/comm } diff --git a/data/refdata/exchanges.cfg b/data/refdata/exchanges.cfg index f2ab607..a8ada3c 100644 --- a/data/refdata/exchanges.cfg +++ b/data/refdata/exchanges.cfg @@ -3,6 +3,51 @@ { "__DUMMY__": {} # ----------------------------- A + , "ALPACA_PROD": { + # https://docs.alpaca.markets/reference/ + "exchange_id": "ALPACA" + , "name": "Alpaca Trading" + , "type": "EQUITY" + + , "cred_key": "ALPACA_PROD" + + , "order_entry": { + "class": "cvttpy.exchanges.alpaca.oe_client.AlpacaOrderEntryClient" + + , "REST": { + "submit_order_url": ["POST", "https://api.alpaca.markets/v2/orders"] + , "orders_url": ["GET", "https://api.alpaca.markets/v2/orders"] + , "order_status": ["GET", "https://api.alpaca.markets/v2/orders/{order_id}"] + , "cancel_order_url": ["DELETE", "https://api.alpaca.markets/v2/orders/{order_id}"] + , "cancel_all_url": ["DELETE", "https://api.alpaca.markets/v2/orders"] + } + , "ws_url": ["WSS", "wss://api.alpaca.markets/stream"] + } + , "mktdata" : { + "class": "cvttpy.exchanges.alpaca.mkt_data.AlpacaStockFeed" + , "reconnect_secs": 2.0 + + # , "ws_url": ["WSS", "wss://stream.data.alpaca.markets/v2/sip"] + , "ws_url": ["WSS", "wss://stream.data.alpaca.markets/v2/iex"] + , "REST": { + "hist_md_bars": ["GET", "https://data.alpaca.markets/v2/stocks/bars"] + , "hist_md_quotes": ["GET", "https://data.alpaca.markets/v2/stocks/quotes"] + , "hist_md_trades": ["GET", "https://data.alpaca.markets/v2/stocks/trades"] + , "latest_trade": ["GET", "https://data.alpaca.markets/v2/stocks/{symbol}/trades/latest"] + , "assets": ["GET", "https://api.alpaca.markets/v2/assets"] + # , "assets": ["GET", "https://data.alpaca.markets/v2/assets"] + } + } + , "accounting": { + "class": "cvttpy.exchanges.alpaca.account.AlpacaAccounting" + + , "REST": { + "balances_url": ["GET", "https://api.alpaca.markets/v2/positions"] + , "account_info_url": ["GET", "https://api.alpaca.markets/v2/account"] + , "trades_url": ["GET", "https://api.alpaca.markets/v2/account/activities/FILL"] + } + } + } , "ALPACA_SIM": { # https://docs.alpaca.markets/reference/ "exchange_id": "ALPACA" @@ -471,6 +516,15 @@ , "channel_prefix": "MD_ALPACA_SNDBX" } } + , "MD_GATEWAY": { + "exchange_id": "MD_GATEWAY" + , "name": "MD Portal (proxy)" + , "type": "PROXY" + + , "mktdata" : { + "class": "cvttpy.exchanges.proxies.md_gateway_clnt.mkt_data.MktDataGatewayFeed" + } + } , "MD_PORTAL_ALPACA_03": { "exchange_id": "MD_PORTAL" , "name": "MD Portal (proxy)"