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

FillMonitor\Rest -- OrderNotFoundException #187

Open
dfelton opened this issue Apr 23, 2021 · 1 comment
Open

FillMonitor\Rest -- OrderNotFoundException #187

dfelton opened this issue Apr 23, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request Priority - Medium

Comments

@dfelton
Copy link
Owner

dfelton commented Apr 23, 2021

Shutdown Enabled at: 2021-04-23 05:14:21
Exception: Kobens\Gemini\Exception\Api\Reason\OrderNotFoundException
Code: 404
Message: Order 35815340906 not found
Strace:
#0 src/Api/Rest/PrivateEndpoints/Request.php(119): Kobens\Gemini\Api\Helper\ResponseHandler->handleResponse(Object(Kobens\Core\Http\Response))
#1 src/Api/Rest/PrivateEndpoints/OrderStatus/OrderStatus.php(50): Kobens\Gemini\Api\Rest\PrivateEndpoints\Request->getResponse('/v1/order/statu...', Array, Array, true)
#2 src/Api/Rest/PrivateEndpoints/OrderStatus/OrderStatus.php(37): Kobens\Gemini\Api\Rest\PrivateEndpoints\OrderStatus\OrderStatus->getResponse(Array)
#3 src/Command/Command/TradeRepeater/FillMonitor/Rest.php(272): Kobens\Gemini\Api\Rest\PrivateEndpoints\OrderStatus\OrderStatus->getStatus(35815340906)
#4 src/Command/Command/TradeRepeater/FillMonitor/Rest.php(184): Kobens\Gemini\Command\Command\TradeRepeater\FillMonitor\Rest->isFilled(35815340906)
#5 src/Command/Command/TradeRepeater/FillMonitor/Rest.php(155): Kobens\Gemini\Command\Command\TradeRepeater\FillMonitor\Rest->iterateBuyOrders(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, NULL)
#6 src/Command/Command/TradeRepeater/FillMonitor/Rest.php(110): Kobens\Gemini\Command\Command\TradeRepeater\FillMonitor\Rest->mainLoop(Object(Symfony\Component\Console\Output\ConsoleOutput), true, true, NULL)
#7 vendor/symfony/console/Command/Command.php(255): Kobens\Gemini\Command\Command\TradeRepeater\FillMonitor\Rest->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Kobens\Gemini\Command\Command\TradeRepeater\FillMonitor\Rest), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 bin/gemini(443): Symfony\Component\Console\Application->run()
#12 {main}

Previous Exception:
Exception: Exception
Code: 0
Message: {"body":"{\"result\":\"error\",\"reason\":\"OrderNotFound\",\"message\":\"Order 35815340906 not found\"}","response_code":404}
Strace:
#0 src/Api/Rest/PrivateEndpoints/Request.php(119): Kobens\Gemini\Api\Helper\ResponseHandler->handleResponse(Object(Kobens\Core\Http\Response))
#1 src/Api/Rest/PrivateEndpoints/OrderStatus/OrderStatus.php(50): Kobens\Gemini\Api\Rest\PrivateEndpoints\Request->getResponse('/v1/order/statu...', Array, Array, true)
#2 src/Api/Rest/PrivateEndpoints/OrderStatus/OrderStatus.php(37): Kobens\Gemini\Api\Rest\PrivateEndpoints\OrderStatus\OrderStatus->getResponse(Array)
#3 src/Command/Command/TradeRepeater/FillMonitor/Rest.php(272): Kobens\Gemini\Api\Rest\PrivateEndpoints\OrderStatus\OrderStatus->getStatus(35815340906)
#4 src/Command/Command/TradeRepeater/FillMonitor/Rest.php(184): Kobens\Gemini\Command\Command\TradeRepeater\FillMonitor\Rest->isFilled(35815340906)
#5 src/Command/Command/TradeRepeater/FillMonitor/Rest.php(155): Kobens\Gemini\Command\Command\TradeRepeater\FillMonitor\Rest->iterateBuyOrders(Object(Symfony\Component\Console\Output\ConsoleOutput), Array, NULL)
#6 src/Command/Command/TradeRepeater/FillMonitor/Rest.php(110): Kobens\Gemini\Command\Command\TradeRepeater\FillMonitor\Rest->mainLoop(Object(Symfony\Component\Console\Output\ConsoleOutput), true, true, NULL)
#7 vendor/symfony/console/Command/Command.php(255): Kobens\Gemini\Command\Command\TradeRepeater\FillMonitor\Rest->execute(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#8 vendor/symfony/console/Application.php(1009): Symfony\Component\Console\Command\Command->run(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#9 vendor/symfony/console/Application.php(273): Symfony\Component\Console\Application->doRunCommand(Object(Kobens\Gemini\Command\Command\TradeRepeater\FillMonitor\Rest), Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#10 vendor/symfony/console/Application.php(149): Symfony\Component\Console\Application->doRun(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))
#11 bin/gemini(443): Symfony\Component\Console\Application->run()
#12 {main}
@dfelton dfelton added enhancement New feature or request Priority - Medium labels Apr 23, 2021
@dfelton dfelton self-assigned this Apr 23, 2021
@dfelton dfelton pinned this issue Apr 23, 2021
@dfelton
Copy link
Owner Author

dfelton commented Apr 23, 2021

Some things to note about this issue:

  • The order really did get placed on the exchange
    • Briefly afterwards Gemini went under emergency maintenance due to a service disruption
    • After the service disruption was resolved, the order status was able to be returned as expected
  • Current logic left the record in is_error=0 state with no error data present.

This issue highlights the fact that, similar to fetching orders with the client_order_id, it is possible for the API to return "order not found" for orders that really do exist. When addressing this issue (and the same when interacting with client_order_id) it will be important to allow a certain amount of time to pass to cover for the potential scenario that it may be Gemini experiencing an issue.

Service Outage at time of issue occurring: https://status.gemini.com/incidents/6hpb4jjmn2ss

@dfelton dfelton changed the title Order Not Found FillMonitor\Rest -- OrderNotFoundException May 10, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request Priority - Medium
Projects
None yet
Development

No branches or pull requests

1 participant