ronaldlam / Autotrageur

Automated arbitrageur
2 stars 1 forks source link

Arbitrage: Gemini cancelled orders are currently parsed and returned. #218

Closed ronaldlam closed 5 years ago

ronaldlam commented 5 years ago

Background: From 2018-08-22_18_37_48_205938.log, there was a sell_response with all zeros. Timestamp is 18:40:38pm local time. This sell_response ended up persisted into the DB.

Relevant JSON:

{
    "order_id": "103412587",
    "id": "103412587",
    "symbol": "btcusd",
    "exchange": "gemini",
    "avg_execution_price": "0.00",
    "side": "sell",
    "type": "exchange limit",
    "timestamp": "1534988438",
    "timestampms": 1534988438283,
    "is_live": false,
    "is_cancelled": true,
    "is_hidden": false,
    "was_forced": false,
    "executed_amount": "0",
    "remaining_amount": "0.00320509",
    "client_order_id": "1534988438180",
    "reason": "SelfCrossPrevented",
    "options": [
        "immediate-or-cancel"
    ],
    "price": "3973.86",
    "original_amount": "0.00320509"
}

Strategy: Can either change the response handling or throw error on parsing the cancellation.