This commit is contained in:
Cryptoval Trading Technologies 2024-10-06 16:08:06 +00:00
parent 16228e7f0d
commit 4bc2ee411a
2 changed files with 116 additions and 0 deletions

View File

@ -0,0 +1,106 @@
@var CONFIG_SERVICE=cloud23.cvtt.vpn:6789
@var SQLITE_DIR=/home/oleg/tmp/sqlite
{
"refdata": @inc=http://${CONFIG_SERVICE}/refdata/refdata
, "redis": @inc=http://${CONFIG_SERVICE}/apps/common/redis
, "redis_settings": "localhost"
, "simulation": {
"speed_factor": 0.0,
"time_events_interval_ms": 0
}
, "market_simulator" : {
"market_data": {
"sources": [
# {
# "loader_class": "cvttpy.trading.mkt_data.time_series.loaders.sqlite_loader.SqliteMdLoader"
# , "file_name": "${SQLITE_DIR}/20240906.COIN.1min.db"
# , "table_name": "md_1min_bars"
# , "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"
# , "open"
# , "high"
# , "low"
# , "close"
# , "volume"
# , "vwap"
# , "num_trades"
# ]
# , "time_column": "tstamp"
# , "exchange_id": "ALPACA"
# , "instruments": ["STOCK-COIN"]
# , "md_type": "HIST_BAR"
# }
{
"loader_class": "cvttpy.trading.mkt_data.time_series.loaders.tsdb_loader.TimescaleTSLoader"
, "credentials_key": "TSDB_MD_CVTTDATA_RO"
, "interval": "2 hours"
, "from_time": "2024-10-03 09:00:00"
, "exchange_id": "COINBASE"
, "instruments": ["PAIR-BTC-USD"]
, "md_type": "TRADES"
, "table_name": "coinbase.md_trades"
, "columns": [
"time",
"local_time_ns",
"exchange_ts_ns",
"exchange_id",
"instrument_id",
"price",
"quantity",
"taker_side",
"'TRD' as type",
]
, "time_column": "time"
}
, {
"loader_class": "cvttpy.trading.mkt_data.time_series.loaders.tsdb_loader.TimescaleTSLoader"
, "credentials_key": "TSDB_MD_CVTTDATA_RO"
, "interval": "2 hours"
, "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://localhost:8080/ws"
}
}
}
, "accounting": {
"initial_positions": {
"COINBASE": {
"BTC": 0
, "USD": 1000.0
}
}
}
, "order_entry": {
"execution": {
"top_only": true
,"min_order_age_sec": 0.1
, "pricing_method": "BY_MKT_TRD_PRICE_BY_ORDER"
# , "presubscribe_md_types": ["BOOK_TOP", "TRADES"]
}
}
}
}

View File

@ -419,6 +419,16 @@
, "channel_prefix": "MD_ALPACA_03"
}
}
, "MARKET_SIMULATOR": {
"exchange_id": "MARKET_SIMULATOR"
, "name": "Market Simulator"
, "type": "SIM"
, "mktdata" : {
"class": "cvttpy.exchanges.mkt_simulator.mkt_data.MktSimMdClientFeed"
"ws_url": "ws://localhost:8080/ws"
}
}
# ---------------------------- O
, "OKX": {
"exchange_id": "OKX"