139 lines
5.4 KiB
INI
139 lines
5.4 KiB
INI
@var CONFIG_SERVICE=cloud23.cvtt.vpn:6789
|
|
@var SQLITE_DIR=/home/oleg/tmp/sqlite
|
|
|
|
@var FROM_TIME="2024-10-03 13:30:00"
|
|
@var INTERVAL="18 minutes"
|
|
|
|
{
|
|
"refdata": @inc=http://${CONFIG_SERVICE}/refdata/refdata
|
|
, "redis": @inc=http://${CONFIG_SERVICE}/apps/common/redis
|
|
, "redis_settings": "localhost"
|
|
, "simulation": {
|
|
"speed_factor": 100.0,
|
|
"time_events_interval_ms": 0
|
|
}
|
|
, "market_simulator" : {
|
|
"initial_positions": {
|
|
"exchange": "COINBASE",
|
|
"assets": {
|
|
"BTC": 0.0
|
|
, "ETH": 0.0
|
|
, "USD": 10000
|
|
}
|
|
}
|
|
, "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": ${INTERVAL}
|
|
, "from_time": ${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": ${INTERVAL}
|
|
, "from_time": ${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"
|
|
}
|
|
}
|
|
}
|
|
, "order_entry": {
|
|
"execution": {
|
|
"execute_on": ["BOOK_TOP", "TRADES"]
|
|
"top_only": true
|
|
,"min_order_age_sec": 0.1
|
|
, "pricing_method": "BY_MKT_TRD_PRICE_BY_ORDER"
|
|
|
|
, "short_sale_allowed": false
|
|
, "fee_schedule": {
|
|
"taker_fee": 0.006
|
|
"maker_fee": 0.004
|
|
}
|
|
# , "presubscribe_md_types": ["BOOK_TOP", "TRADES"]
|
|
}
|
|
, "api": {
|
|
"web_socket": {
|
|
"url": "ws://localhost:8180/ws"
|
|
}
|
|
, "REST": {
|
|
"port": 8181
|
|
"new_order_url": ["POST", "http://localhost:8181/order"]
|
|
, "cancel_order_url": ["POST", "http://localhost:8181/cancel"]
|
|
, "cancel_all_url": ["POST", "http://localhost:8181/cancel_all"]
|
|
, "open_orders_url": ["GET", "http://localhost:8181/open_orders"]
|
|
, "order_status_url": ["GET", "http://localhost:8181/order_status"]
|
|
}
|
|
}
|
|
}
|
|
, "accounting": {
|
|
"api": {
|
|
"REST": {
|
|
"port": 8182
|
|
, "positions_url": ["GET", "http://localhost:8182/positions"]
|
|
, "trades_url": ["GET", "http://localhost:8182/trades"]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|