progress
This commit is contained in:
parent
8b109e933c
commit
c1c72b7f80
@ -110,12 +110,24 @@
|
|||||||
"docker": "true",
|
"docker": "true",
|
||||||
"gui": "true",
|
"gui": "true",
|
||||||
},
|
},
|
||||||
|
"cvtt-write": {
|
||||||
|
"type": "vm",
|
||||||
|
"users": ["oleg"],
|
||||||
|
"docker": "true",
|
||||||
|
"gui": "true",
|
||||||
|
},
|
||||||
"desktop": {
|
"desktop": {
|
||||||
"type": "vm",
|
"type": "vm",
|
||||||
"users": ["oleg"],
|
"users": ["oleg"],
|
||||||
"docker": "false",
|
"docker": "false",
|
||||||
"gui": "true",
|
"gui": "true",
|
||||||
},
|
},
|
||||||
|
"home-fin": {
|
||||||
|
"type": "vm",
|
||||||
|
"users": ["oleg"],
|
||||||
|
"docker": "false",
|
||||||
|
"gui": "true",
|
||||||
|
},
|
||||||
|
|
||||||
// -- Headless
|
// -- Headless
|
||||||
"cvtt-build": {
|
"cvtt-build": {
|
||||||
|
|||||||
@ -17,4 +17,10 @@
|
|||||||
"based_on_project": "cvttpy"
|
"based_on_project": "cvttpy"
|
||||||
# "additional_projects": []
|
# "additional_projects": []
|
||||||
}
|
}
|
||||||
|
, "Crypto Daily MD": {
|
||||||
|
"image_name": "crypto_md_day",
|
||||||
|
"docker_dev_path": "market_data/crypto_md_day",
|
||||||
|
"based_on_project": "ops"
|
||||||
|
# "additional_projects": []
|
||||||
|
}
|
||||||
}
|
}
|
||||||
50
data/apps/research/cointegration_trader.cfg
Normal file
50
data/apps/research/cointegration_trader.cfg
Normal file
@ -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
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@ -8,6 +8,8 @@
|
|||||||
@var ACCT_REST_PORT=10083
|
@var ACCT_REST_PORT=10083
|
||||||
|
|
||||||
@var DATE=20241114
|
@var DATE=20241114
|
||||||
|
@var FROM_TIME=13:30
|
||||||
|
@var TO_TIME=20:00
|
||||||
|
|
||||||
{
|
{
|
||||||
"refdata": @inc=http://${CONFIG_SERVICE}/refdata/refdata
|
"refdata": @inc=http://${CONFIG_SERVICE}/refdata/refdata
|
||||||
@ -15,8 +17,8 @@
|
|||||||
, "comm": @inc=http://${CONFIG_SERVICE}/apps/common/comm
|
, "comm": @inc=http://${CONFIG_SERVICE}/apps/common/comm
|
||||||
, "comm_settings": "/comm/pubsub/redis/localhost"
|
, "comm_settings": "/comm/pubsub/redis/localhost"
|
||||||
, "simulation": {
|
, "simulation": {
|
||||||
# "speed_factor": 1.0,
|
|
||||||
"speed_factor": 0.0,
|
"speed_factor": 0.0,
|
||||||
|
# "speed_factor": 1000.0,
|
||||||
"time_events_interval_ms": 0
|
"time_events_interval_ms": 0
|
||||||
}
|
}
|
||||||
, "market_simulator" : {
|
, "market_simulator" : {
|
||||||
@ -32,7 +34,7 @@
|
|||||||
"sources": [
|
"sources": [
|
||||||
{
|
{
|
||||||
"loader_class": "cvttpy.trading.mkt_data.time_series.loaders.sqlite_loader.SqliteMdLoader"
|
"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"
|
, "exchange_id": "ALPACA"
|
||||||
, "instruments": ["STOCK-COIN", "STOCK-CAN"]
|
, "instruments": ["STOCK-COIN", "STOCK-CAN"]
|
||||||
, "md_types": {
|
, "md_types": {
|
||||||
@ -54,6 +56,8 @@
|
|||||||
, "tape"
|
, "tape"
|
||||||
]
|
]
|
||||||
, "time_column": "tstamp"
|
, "time_column": "tstamp"
|
||||||
|
, "from_time": "${FROM_TIME}"
|
||||||
|
, "to_time": "${TO_TIME}"
|
||||||
}
|
}
|
||||||
, "BOOK_TOP": {
|
, "BOOK_TOP": {
|
||||||
"table_name": "md_quotes"
|
"table_name": "md_quotes"
|
||||||
@ -71,6 +75,8 @@
|
|||||||
, "ask_qty as ask_quantity"
|
, "ask_qty as ask_quantity"
|
||||||
]
|
]
|
||||||
, "time_column": "tstamp"
|
, "time_column": "tstamp"
|
||||||
|
, "from_time": "${FROM_TIME}"
|
||||||
|
, "to_time": "${TO_TIME}"
|
||||||
}
|
}
|
||||||
# , "HIST_BAR": {
|
# , "HIST_BAR": {
|
||||||
# "table_name": "md_1min_bars"
|
# "table_name": "md_1min_bars"
|
||||||
|
|||||||
@ -21,6 +21,15 @@
|
|||||||
"read_only": "ALPACA_SANDBOX"
|
"read_only": "ALPACA_SANDBOX"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
, "ALPACA_PROD": {
|
||||||
|
"accounting": {
|
||||||
|
"enabled": true
|
||||||
|
, "streaming": false
|
||||||
|
}
|
||||||
|
, "credentials_key": {
|
||||||
|
"read_only": "ALPACA_PROD"
|
||||||
|
}
|
||||||
|
}
|
||||||
, "GEMINI-SNDBX": {
|
, "GEMINI-SNDBX": {
|
||||||
"accounting": {
|
"accounting": {
|
||||||
"enabled": true
|
"enabled": true
|
||||||
|
|||||||
@ -21,8 +21,16 @@
|
|||||||
"read_only": "ALPACA_SANDBOX"
|
"read_only": "ALPACA_SANDBOX"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
, "ALPACA_PROD": {
|
||||||
|
"accounting": {
|
||||||
|
"enabled": true
|
||||||
|
, "streaming": false
|
||||||
|
}
|
||||||
|
, "credentials_key": {
|
||||||
|
"read_only": "ALPACA_PROD"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
, "refdata": @inc=http://${CONFIG_SERVICE}/refdata/refdata
|
, "refdata": @inc=http://${CONFIG_SERVICE}/refdata/refdata
|
||||||
, "comm": @inc=http://${CONFIG_SERVICE}/apps/common/comm
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -3,6 +3,51 @@
|
|||||||
{
|
{
|
||||||
"__DUMMY__": {}
|
"__DUMMY__": {}
|
||||||
# ----------------------------- A
|
# ----------------------------- 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": {
|
, "ALPACA_SIM": {
|
||||||
# https://docs.alpaca.markets/reference/
|
# https://docs.alpaca.markets/reference/
|
||||||
"exchange_id": "ALPACA"
|
"exchange_id": "ALPACA"
|
||||||
@ -471,6 +516,15 @@
|
|||||||
, "channel_prefix": "MD_ALPACA_SNDBX"
|
, "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": {
|
, "MD_PORTAL_ALPACA_03": {
|
||||||
"exchange_id": "MD_PORTAL"
|
"exchange_id": "MD_PORTAL"
|
||||||
, "name": "MD Portal (proxy)"
|
, "name": "MD Portal (proxy)"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user