alpacahq / Alpaca-API

The Alpaca API is a developer interface for trading operations and market data reception through the Alpaca platform.
https://alpaca.markets/
142 stars 13 forks source link

Order cancellation not performed #97

Open d-e-s-o opened 4 years ago

d-e-s-o commented 4 years ago

Third time hopefully is a charm...

Here is a trace of attempted order deletion.

HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/d7bf596dd6c54efd8342d566fd9a71f3
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/1985c2af0e554bb0b599157ee4e5e239
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/7d19a8d874734d12b7337976a3c46e9a
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/5543edee2e1342b7832a74cf889d75b3
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/578557f870a2413a87f69379a7328f87
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/39eef2f1ce954415841a050696a08448
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/7a210e370897441ba8fce3c49aecff3b
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/14d601e1e9fc435eb8806d53261e5436
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/4454adf0917a4c3599a509441622a607
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/81eb8c23d2bf47c1a7c2aa7b0a88e512
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/c2ab0339d675424a80551826df9afc78
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/3234770add79497e822cdc47feba3977
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/f715b42b103043f0b4233d041c86a09c
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/3bb4288921064d2bb110b813556eeaaa
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/eb7ae6a0cec343228a97dccc793cb707
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/14cc120c234f454ea97d2f4968454183
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/10c4e8e3e7334dc5a6415f16713d0aba
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/1cfc3f6727cd4ecaba4ac2c1a1458ec2
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/f17b205517934deba5f386f60a862446
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/c67ad41cb7304111848e2aa5f74d25d5
HTTP request: DELETE to https://paper-api.alpaca.markets/v2/orders/1db2a7bb32bc48cbaebb8932a1409a02
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content
HTTP status: 204 No Content

Once again all requests were successful. Yet, nothing has happened. The orders are still there in the dashboard and visible through the API.

umitanuki commented 4 years ago

Sorry for the late. As far as I can check, those orders in paper trading are correctly canceled. It should be shown in dashboard as canceled but are you seeing something else?

d-e-s-o commented 4 years ago

Yes, they are correctly cancelled now. Can you please help me understand where those repeated hiccups come from? Also, can you please add tests for this behavior so that these kind of regressions are caught early?