Skip to content
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

Issue when sending limit orders #49

Closed
bluusun opened this issue May 15, 2024 · 5 comments
Closed

Issue when sending limit orders #49

bluusun opened this issue May 15, 2024 · 5 comments

Comments

@bluusun
Copy link

bluusun commented May 15, 2024

order = client.limit_order_ioc(client_order_id="clientOrderId",product_id='LTC-USD',limit_price='82.9',base_size='1',side='BUY')

This was/is well over limit price (about one dollar) but can't see any execution in Coinbase account.

Market orders work just fine for me.

@bluusun
Copy link
Author

bluusun commented May 15, 2024

{
"success": true,
"failure_reason": "UNKNOWN_FAILURE_REASON",
"order_id": "vvvv-4ef9-9587-fc71dee4f912",
"success_response": {
"order_id": "vvvd2a-4ef9-9587-fc71dee4f912",
"product_id": "LTC-USD",
"side": "BUY",
"client_order_id": "clientOrderId"
},
"order_configuration": {
"sor_limit_ioc": {
"base_size": "1",
"limit_price": "82.9"
}
}
}

@bluusun
Copy link
Author

bluusun commented May 15, 2024

Also how can I sell (market or limit) 1 LTC for instance? Could not find that in documentation :(

@bluusun
Copy link
Author

bluusun commented May 15, 2024

order = client.market_order_sell(client_order_id="clientOrderId",product_id='LTC-USD',base_size='0.01')

print(dumps(order, indent=2))
{
"success": true,
"failure_reason": "UNKNOWN_FAILURE_REASON",
"order_id": "vd2a-4ef9-9587-fc71dev",
"success_response": {
"order_id": "vvvd2a-4ef9-9587-fc7v12",
"product_id": "LTC-USD",
"side": "SELL",
"client_order_id": "clientOrderId"
},
"order_configuration": {
"market_market_ioc": {
"base_size": "0.01"
}
}
}

@xiaofeihuang-cb
Copy link

Thank you for reporting! If this is an SDK specific issue, we will look into it and get back to you soon. If this is an API related request, report it in our Advanced API Discord instead (use this invite link if it's your first time accessing the Discord).

@bluusun
Copy link
Author

bluusun commented May 15, 2024

Figured it out!

  1. client_order_id needs to be a unique string or nothing happens
  2. engine spits out "success": true,
    "failure_reason": "UNKNOWN_FAILURE_REASON",

if it accepts order and/or executes order. Really confusing!

@bluusun bluusun closed this as completed May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants