31ece2e99a
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
58 lines
923 B
SQL
58 lines
923 B
SQL
insert into instruments (
|
|
venue_id,
|
|
symbol,
|
|
asset_class,
|
|
base_asset,
|
|
quote_asset,
|
|
price_scale,
|
|
qty_scale,
|
|
tick_size,
|
|
lot_size,
|
|
active,
|
|
meta
|
|
)
|
|
select
|
|
v.id,
|
|
'BTC-USDT',
|
|
'crypto',
|
|
'BTC',
|
|
'USDT',
|
|
2,
|
|
6,
|
|
0.01,
|
|
0.000001,
|
|
true,
|
|
jsonb_build_object('raw_inst_id', 'BTC-USDT-SWAP', 'product_type', 'swap')
|
|
from venues v
|
|
where v.code = 'OKX'
|
|
on conflict (venue_id, symbol) do nothing;
|
|
|
|
insert into instruments (
|
|
venue_id,
|
|
symbol,
|
|
asset_class,
|
|
base_asset,
|
|
quote_asset,
|
|
price_scale,
|
|
qty_scale,
|
|
tick_size,
|
|
lot_size,
|
|
active,
|
|
meta
|
|
)
|
|
select
|
|
v.id,
|
|
'ETH-USDT',
|
|
'crypto',
|
|
'ETH',
|
|
'USDT',
|
|
2,
|
|
6,
|
|
0.01,
|
|
0.000001,
|
|
true,
|
|
jsonb_build_object('raw_inst_id', 'ETH-USDT-SWAP', 'product_type', 'swap')
|
|
from venues v
|
|
where v.code = 'OKX'
|
|
on conflict (venue_id, symbol) do nothing;
|