File tree Expand file tree Collapse file tree 2 files changed +15
-8
lines changed
examples/exchange_client/oracle_rpc Expand file tree Collapse file tree 2 files changed +15
-8
lines changed Original file line number Diff line number Diff line change @@ -23,9 +23,13 @@ async def main() -> None:
2323 # select network: local, testnet, mainnet
2424 network = Network .testnet ()
2525 client = AsyncClient (network )
26- base_symbol = "INJ"
27- quote_symbol = "USDT"
28- oracle_type = "bandibc"
26+ market = (await client .all_derivative_markets ())[
27+ "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6"
28+ ]
29+
30+ base_symbol = market .oracle_base
31+ quote_symbol = market .oracle_quote
32+ oracle_type = market .oracle_type
2933
3034 task = asyncio .get_event_loop ().create_task (
3135 client .listen_oracle_prices_updates (
Original file line number Diff line number Diff line change @@ -8,15 +8,18 @@ async def main() -> None:
88 # select network: local, testnet, mainnet
99 network = Network .testnet ()
1010 client = AsyncClient (network )
11- base_symbol = "BTC"
12- quote_symbol = "USDT"
13- oracle_type = "bandibc"
14- oracle_scale_factor = 6
11+ market = (await client .all_derivative_markets ())[
12+ "0x17ef48032cb24375ba7c2e39f384e56433bcab20cbee9a7357e4cba2eb00abe6"
13+ ]
14+
15+ base_symbol = market .oracle_base
16+ quote_symbol = market .oracle_quote
17+ oracle_type = market .oracle_type
18+
1519 oracle_prices = await client .fetch_oracle_price (
1620 base_symbol = base_symbol ,
1721 quote_symbol = quote_symbol ,
1822 oracle_type = oracle_type ,
19- oracle_scale_factor = oracle_scale_factor ,
2023 )
2124 print (oracle_prices )
2225
You can’t perform that action at this time.
0 commit comments