Getting closed orders implementation, fixed Binance MARKET order creation, expanded SubmitOrder response (#572)

* 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

Co-authored-by: Vazha Bezhanishvili <vazha.bezhanishvili@elegro.eu>
This commit is contained in:
Vazha
2020-10-22 03:54:24 +03:00
committed by GitHub
parent 4ccb495baf
commit fab9d934fe
54 changed files with 2365 additions and 2151 deletions

View File

@@ -283,18 +283,21 @@ message GetForexRatesResponse {
message OrderDetails {
string exchange = 1;
string id = 2;
string base_currency = 3;
string quote_currency = 4;
string asset_type = 5;
string order_side = 6;
string order_type = 7;
int64 creation_time = 8;
string status = 9;
double price = 10;
double amount = 11;
double open_volume = 12;
double fee = 13;
repeated TradeHistory trades = 14;
string client_order_id = 3;
string base_currency = 4;
string quote_currency = 5;
string asset_type = 6;
string order_side = 7;
string order_type = 8;
int64 creation_time = 9;
int64 update_time = 10;
string status = 11;
double price = 12;
double amount = 13;
double open_volume = 14;
double fee = 15;
double cost = 16;
repeated TradeHistory trades = 17;
}
message TradeHistory {
@@ -321,6 +324,7 @@ message GetOrdersResponse {
message GetOrderRequest {
string exchange = 1;
string order_id = 2;
CurrencyPair pair = 3;
}
message SubmitOrderRequest {
@@ -334,9 +338,17 @@ message SubmitOrderRequest {
string asset_type = 8;
}
message Trades {
double amount = 1;
double price = 2;
double fee = 3;
string fee_asset = 4;
}
message SubmitOrderResponse {
bool order_placed = 1;
string order_id = 2;
repeated Trades trades= 3;
}
message SimulateOrderRequest {