This commit is contained in:
Cryptoval Trading Technologies 2024-12-14 01:08:13 +00:00
parent 8b109e933c
commit c1c72b7f80
7 changed files with 148 additions and 3 deletions

View File

@ -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": {

View File

@ -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": []
}
}

View 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
}
}

View File

@ -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"

View File

@ -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

View File

@ -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
}

View File

@ -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)"