-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
how do I get the orderId? #103
Comments
orderid is clientId when you placed order from v4_client_py import { subaccount = SubaccountClient(wallet, 0) |
but the python package is only for testnet,if I want to trade at the mainnet, how should i do by python package? |
you can find the mainnet configuration here |
|
or the orderid can be found in function(_fix_message) |
but I think the function placeOrder should return the param "orderid", |
Hey, you can either rely on import asyncio
from dydx_v4_client.indexer.rest.indexer_client import IndexerClient
from dydx_v4_client.network import TESTNET
async def get_open_orders(address):
client = IndexerClient(TESTNET.rest_indexer)
orders = await client.account.get_subaccount_orders(
address,
0,
status="OPEN"
)
print("Open orders:", orders)
# Replace with your actual address
address = "dydx14zzueazeh0hj67cghhf9jypslcf9sh2n5k6art"
asyncio.run(get_open_orders(address)) |
Could you provide an example? |
After placing an order, how do I get the orderId? Used to call the function getOrder
The text was updated successfully, but these errors were encountered: