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

trades not being 100% filled #15

Closed
npomfret opened this issue Jan 8, 2018 · 2 comments
Closed

trades not being 100% filled #15

npomfret opened this issue Jan 8, 2018 · 2 comments

Comments

@npomfret
Copy link

npomfret commented Jan 8, 2018

​Some of my orders are not being 100% filled. I have submitted several and they are being executed but the volume is not quite 100% of the volume I requested. I am trading using the API.

​For example: ​I submitted a limit bid order for at price 1800 for 0.1000 BCH/GBP on Mon Jan 08 21:18:49 GMT 2018. The order id was 129356589, the trade has executed and there is no open order remaining.​

The trade that was executed (according to your api) was:

{
"datetime": "2018-01-08 21:18:50",
"id": 1515446330350463,
"type": 2,
"bch": "0.0997",
"bch_gbp": "1800.00",
"gbp": "-179.46",
"fee": "0.54",
"order_id": 129356589
}

You can see the BCH quantity is no correct, it's a little short. This happens ​quite often, but not always - some trades are 100% filled​​.

@whitslack
Copy link

This is an expected consequence of trading fees. When you place a bid order, an amount of the counter asset (GBP in your case) is reserved from your available balance. The exact amount reserved is computed as the quantity of the order (here, 0.1000 BCH), multiplied by the limit price of the order (here, £1800/BCH). To guarantee that your account balance can never go negative, trade fees are charged against the reserved amount, meaning that your order can purchase at a maximum a slightly smaller quantity than you ordered. You might wonder why the trade fee isn't reserved up front in addition to the order total. The reason is that the exact fee rate charged depends on your trailing 30-day trade volume at the time of the trade. The fee rate you would be charged at trade time is unknown at the time you place your order. Charging the trade fees against the reserved amount allows you to trade your entire counter asset balance without concern for variable fee rates.

@npomfret
Copy link
Author

npomfret commented Jan 9, 2018

Thanks for the reply.

@npomfret npomfret closed this as completed Jan 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants