mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-05-31 15:10:42 +00:00
Kraken wsCancelAllOrders added, fix bugs in wsAddOrder, added new API endpoint CancelBatchOrders (#596)
* GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce * return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo * removed the Binance extra method GetClosedOrder * func description corrected * removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side * GetClosedOrder implementation moved to GetOrderInfo * changed GetOrderInfo params * removed Canceled order.Type used for Kraken * update QueryOrder in gctscript * add missed params to QueryOrder validator (gctscript) * fixed testing issues * GetClosedOrder implemented for Kraken and Binance, fixed Binance MARKET order creaton, added rate, fee and cost fileds on SubmitOrder responce * return Trades on Binance SubmitOrder, new validation methods on Binance and kraken GetClosedOrderInfo * removed the Binance extra method GetClosedOrder * func description corrected * removed price, fee and cost from SimulateOrder response, as we get all necessary info in response to calculate them on client side * GetClosedOrder implementation moved to GetOrderInfo * changed GetOrderInfo params * removed Canceled order.Type used for Kraken * update QueryOrder in gctscript * add missed params to QueryOrder validator (gctscript) * fixed testing issues * pull previous changes * linter issues fix * updated query_order exmple in gctscript, fixed params check * removed orderPair unnecessary conversion * added wsCancelAllOrders, fixed bugs * fixed Kraken wsAddOrder method * cleanup * CancelBatchOrders implementation * changed CancelBatchOrders signature * fixed tests and wrappers * btcmarkets_test fix * cleanup * cleanup * changed CancelBatchOrders signature * fmt * Update configtest.json * Update configtest.json * rollback configtest * refactored Kraken wsHandleData to allow tests * removed unnecessary error test in TestWsAddOrderJSON * dependencies updates Co-authored-by: Vazha Bezhanishvili <vazha.bezhanishvili@elegro.eu>
This commit is contained in:
@@ -107,6 +107,38 @@
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/cancelbatchorders": {
|
||||
"post": {
|
||||
"operationId": "GoCryptoTrader_CancelBatchOrders",
|
||||
"responses": {
|
||||
"200": {
|
||||
"description": "A successful response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/gctrpcCancelBatchOrdersResponse"
|
||||
}
|
||||
},
|
||||
"default": {
|
||||
"description": "An unexpected error response.",
|
||||
"schema": {
|
||||
"$ref": "#/definitions/runtimeError"
|
||||
}
|
||||
}
|
||||
},
|
||||
"parameters": [
|
||||
{
|
||||
"name": "body",
|
||||
"in": "body",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"$ref": "#/definitions/gctrpcCancelBatchOrdersRequest"
|
||||
}
|
||||
}
|
||||
],
|
||||
"tags": [
|
||||
"GoCryptoTrader"
|
||||
]
|
||||
}
|
||||
},
|
||||
"/v1/cancelorder": {
|
||||
"post": {
|
||||
"operationId": "GoCryptoTrader_CancelOrder",
|
||||
@@ -2557,20 +2589,6 @@
|
||||
}
|
||||
},
|
||||
"definitions": {
|
||||
"CancelAllOrdersResponseOrders": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"exchange": {
|
||||
"type": "string"
|
||||
},
|
||||
"order_status": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"gctrpcAccount": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
@@ -2688,7 +2706,73 @@
|
||||
"orders": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/CancelAllOrdersResponseOrders"
|
||||
"$ref": "#/definitions/gctrpcCancelAllOrdersResponseOrders"
|
||||
}
|
||||
},
|
||||
"count": {
|
||||
"type": "string",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
"gctrpcCancelAllOrdersResponseOrders": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"exchange": {
|
||||
"type": "string"
|
||||
},
|
||||
"order_status": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"gctrpcCancelBatchOrdersRequest": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"exchange": {
|
||||
"type": "string"
|
||||
},
|
||||
"account_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"orders_id": {
|
||||
"type": "string"
|
||||
},
|
||||
"pair": {
|
||||
"$ref": "#/definitions/gctrpcCurrencyPair"
|
||||
},
|
||||
"asset_type": {
|
||||
"type": "string"
|
||||
},
|
||||
"wallet_address": {
|
||||
"type": "string"
|
||||
},
|
||||
"side": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"gctrpcCancelBatchOrdersResponse": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"orders": {
|
||||
"type": "array",
|
||||
"items": {
|
||||
"$ref": "#/definitions/gctrpcCancelBatchOrdersResponseOrders"
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"gctrpcCancelBatchOrdersResponseOrders": {
|
||||
"type": "object",
|
||||
"properties": {
|
||||
"order_status": {
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user