This commit is contained in:
Cryptoval Trading Technologies 2024-02-28 23:04:09 +00:00
parent fe2671e1bb
commit 58c1a5c7bd
11 changed files with 199 additions and 59 deletions

3
.vscode/settings.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"workbench.colorTheme": "Noctis Bordo"
}

View File

@ -11,54 +11,8 @@
}
, "books": {
"CVTT_BK01": {}
"ALPACA_BK02": {}
}
# , "backtest": {
# "exchanges_settings": {
# "*": {
# "mkt_data": {
# "enabled": true
# , "streaming": true
# }
# ,"order_entry": {
# "enabled": true
# , "streaming": true
# }
# ,"accounting": {
# "enabled": true
# , "streaming": false
# }
# }
# }
# , "source": {
# "database": {
# "class": "cvttpy.tools.db.timescale.tsdb_client.TimescaleDbClient"
# , "credentials_key": "TSDB_MD_CVTTDATA_RO"
# }
# # , "interval": "4 hours"
# , "interval": "3 hours"
# , "from_time": "2023-12-28 03:00:00"
# }
# , "initial_positions": {
# "COINBASE": {
# "BTC": 0
# , "USD": 1000.0
# }
# }
# , "simulation": {
# "speed_factor": 0.0
# }
# , "execution": {
# "top_only": true
# ,"min_order_age_sec": 0.1
# , "pricing_method": "BY_MKT_TRD_PRICE_BY_ORDER"
# # , "presubscribe_md_types": ["BOOK_TOP", "TRADES"]
# }
# , "result": {
# "repository": "${ResultPath}/backtest_results.json"
# , "db_file": "${ResultPath}/%T.backtest.db"
# }
# }
# --------------------------------------------------------------------
, "trader": {
"app_channel": "TRDR" active_exchanges_: str
@ -107,6 +61,24 @@
, "trade": "COINBASE_ADV_TRD"
}
}
"ALPACA_SNDBX": {
"order_entry": {
"enabled": true
, "streaming": true
},
"mkt_data": {
"enabled": false
, "streaming": false
},
"accounting": {
"enabled": false
, "streaming": false
}
, "credentials_key": {
"read_only": "ALPACA_SANDBOX"
, "trade": "ALPACA_SANDBOX"
}
}
}
}
# --------------------------------------------------------------------
@ -176,6 +148,20 @@
, "read_only": "COINBASE_ADV_RO"
}
}
, "ALPACA_SNDBX": {
"mkt_data": {
"enabled": true
, "streaming": true
},
"accounting": {
"enabled": true
, "streaming": false
}
, "credentials_key": {
"trade": "ALPACA_SANDBOX"
, "read_only": "ALPACA_SANDBOX"
}
}
}
}
, "trading_recorder": {

75
data/apps/md_portal.cfg Normal file
View File

@ -0,0 +1,75 @@
@var CONFIG_SVC_HOST=cloud16.cvtt.vpn
{
# ----------------------------------
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "cvttcomm": {
"type": "redis"
, "redis_settings": "cvtt-prod-02"
# , "redis_settings": "cloud17"
}
"md_portal": {
"app_channel": "MD_PORTAL"
, "exchanges_settings": {
"ALPACA_SNDBX": {
"order_entry": {
"enabled": false
, "streaming": false
},
"mkt_data": {
"enabled": true
, "streaming": true
},
"accounting": {
"enabled": false
, "streaming": false
}
}
, "BNBSPOT": {
"order_entry": {
"enabled": false
, "streaming": false
},
"mkt_data": {
"enabled": true
, "streaming": true
},
"accounting": {
"enabled": false
, "streaming": false
}
}
, "BNBFUT": {
"order_entry": {
"enabled": false
, "streaming": false
},
"mkt_data": {
"enabled": true
, "streaming": true
},
"accounting": {
"enabled": false
, "streaming": false
}
}
"COINBASE_AT": {
"order_entry": {
"enabled": false
, "streaming": false
},
"mkt_data": {
"enabled": true
, "streaming": true
},
"accounting": {
"enabled": false
, "streaming": false
}
}
}
}
}

View File

@ -1,7 +1,14 @@
@var CONFIG_SVC_HOST=cloud16.cvtt.vpn
{
"md_recorder": {
"refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "cvttcomm": {
"type": "redis"
, "redis_settings": "cvtt-prod-02"
# , "redis_settings": "cloud17"
}
, "md_recorder": {
"db": {
"class": "cvttpy.tools.db.timescale.tsdb_client.TimescaleDbClient"
}
@ -59,8 +66,6 @@
}
# ----------------------------------
, "refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
, "exchanges_settings": {
"ALPACA_SNDBX": {
"order_entry": {

View File

@ -24,4 +24,9 @@
, "read_timeout" : 0.01
, "ping_timeout_secs": 2.0
}
, "cvtt-prod-02": {
"url": "redis://cvtt-prod-02.cvtt.vpn"
, "read_timeout" : 0.01
, "ping_timeout_secs": 2.0
}
}

View File

@ -1,4 +1,3 @@
@var CONFIG_DIR=/home/oleg/develop/cvtt2/cvttpy/config_examples
@var CONFIG_SVC_HOST=cloud16.cvtt.vpn
{
@ -10,6 +9,13 @@
},
}
}
, "cvttcomm": {
"type": "redis"
, "redis_settings": "localhost"
}
, "md_portal": {
"app_channel": "MD_PORTAL"
}
, "refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
}

View File

@ -0,0 +1,22 @@
@var CONFIG_SVC_HOST=cloud16.cvtt.vpn
{
"exchanges_settings": {
"*": {
"mkt_data": {
"enabled": true
, "streaming": true
},
}
}
, "cvttcomm": {
"type": "redis"
, "redis_settings": "cvtt-prod-02"
}
, "md_portal": {
"app_channel": "MD_PORTAL"
}
, "refdata": @inc=http://${CONFIG_SVC_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CONFIG_SVC_HOST}:6789/apps/redis
}

View File

@ -1,9 +1,23 @@
@var CVTT_CONFIG_HOST=cloud16.cvtt.vpn
{
"refdata": @inc=http://cloud11.cvtt.vpn:6789/refdata/refdata
, "redis": @inc=http://cloud11.cvtt.vpn:6789/apps/redis
, "cvttcomm": @inc=http://cloud11.cvtt.vpn:6789/apps/cvttcomm
"refdata": @inc=http://${CVTT_CONFIG_HOST}:6789/refdata/refdata
, "redis": @inc=http://${CVTT_CONFIG_HOST}:6789/apps/redis
, "cvttcomm": {
"type": "redis"
# , "redis_settings": "localhost"
, "redis_settings": "cvtt-prod"
}
, "executor": {
"app_channel": "EXEC"
}
, "exchanges_settings": {
"CVTT": {
"order_entry": {
"enabled": true
, "streaming": true
}
}
"CVTT_COINBASE": {
"order_entry": {
"enabled": true

View File

@ -7,10 +7,10 @@
# "md_symbol": "AAPL",
# "trade_symbol": "AAPL"
# }
"STOCK-IBM": {
"md_symbol": "IBM",
"trade_symbol": "IBM"
}
# "STOCK-IBM": {
# "md_symbol": "IBM",
# "trade_symbol": "IBM"
# }
}
}
, "BNBSPOT": {

View File

@ -122,6 +122,21 @@
}
}
# ---------------------- C
, "CVTT": {
"exchange_id": "CVTT"
, "name": "CVTT Executor (proxy)"
, "type": "PROXY"
, "order_entry": {
"class": "cvttpy.exchanges.proxies.cvtt.connector.CvttExecutorClient"
}
, "accounting": {
"class": "cvttpy.exchanges.proxies.cvtt.connector.CvttExecutorClient"
}
,"listen_channel_prefix": "CVTT_CLNT"
# , "executor_channel": "EXEC"
}
, "CVTT_COINBASE": {
"exchange_id": "CVTT_COINBS"
, "name": "CVTT Trader (proxy)"
@ -239,5 +254,14 @@
}
}
, "MD_PORTAL": {
"exchange_id": "MD_PORTAL"
, "name": "MD Portal (proxy)"
, "type": "PROXY"
, "mktdata" : {
"class": "cvttpy.exchanges.proxies.md_portal_clnt.mkt_data.MktDataPortalFeed"
}
}
}

View File

@ -67,7 +67,7 @@
"base_asset": "BTC",
"quote_asset": "USD",
"quantity_precision": "0.00000001",
"price_tick": 0.1
"price_tick": 0.01
},
"PAIR-BTC-USDT": {
"base_asset": "BTC",