.
This commit is contained in:
parent
82bc99e00d
commit
cf62777b62
@ -1,7 +1,7 @@
|
|||||||
@var CONFIG_SERVICE=cloud23.cvtt.vpn:6789
|
@var CONFIG_SERVICE=cloud23.cvtt.vpn:6789
|
||||||
@var SQLITE_DIR=/home/oleg/tmp/sqlite
|
@var SQLITE_DIR=/home/oleg/tmp/sqlite
|
||||||
|
|
||||||
@var FROM_TIME="2024-10-03 13:30:00"
|
@var FROM_TIME="2024-11-14 13:30:00"
|
||||||
@var INTERVAL="18 minutes"
|
@var INTERVAL="18 minutes"
|
||||||
# @var INTERVAL="5 minutes"
|
# @var INTERVAL="5 minutes"
|
||||||
|
|
||||||
142
data/apps/research/mkt_simulator_eqt.cfg
Normal file
142
data/apps/research/mkt_simulator_eqt.cfg
Normal file
@ -0,0 +1,142 @@
|
|||||||
|
@var CONFIG_SERVICE=cloud23.cvtt.vpn:6789
|
||||||
|
@var SQLITE_DIR=/home/oleg/tmp/sqlite
|
||||||
|
|
||||||
|
@var DATE="20241114"
|
||||||
|
# @var FROM_TIME="2024-11-14 13:30:00"
|
||||||
|
# @var INTERVAL="18 minutes"
|
||||||
|
# @var INTERVAL="5 minutes"
|
||||||
|
|
||||||
|
{
|
||||||
|
"refdata": @inc=http://${CONFIG_SERVICE}/refdata/refdata
|
||||||
|
, "comm": @inc=http://${CONFIG_SERVICE}/apps/common/comm
|
||||||
|
, "comm": @inc=http://${CONFIG_SERVICE}/apps/common/comm
|
||||||
|
, "comm_settings": "/comm/pubsub/redis/localhost"
|
||||||
|
, "simulation": {
|
||||||
|
# "speed_factor": 1.0,
|
||||||
|
"speed_factor": 0.0,
|
||||||
|
"time_events_interval_ms": 0
|
||||||
|
}
|
||||||
|
, "market_simulator" : {
|
||||||
|
"initial_positions": {
|
||||||
|
"exchange": "ALPACA",
|
||||||
|
"assets": {
|
||||||
|
"BTC": 0.5
|
||||||
|
, "ETH": 0.0
|
||||||
|
, "USD": 10_000.0
|
||||||
|
}
|
||||||
|
}
|
||||||
|
, "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_TRADE"
|
||||||
|
|
||||||
|
, "short_sale_allowed": false
|
||||||
|
, "fee_schedule": {
|
||||||
|
"taker_fee_rate": 0.006
|
||||||
|
"maker_fee_rate": 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"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user