Poloniex: Implementation of GetOrderInfo method (#607)

* 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

* fixed issue with PortfolioSleepDelay set on startup

* add GetWithdrawalsHistory method to exchanges interface

* param name changes

* add extra params for Binance WithdrawStatus method

* add Binance TestWithdrawHistory

* add GetOrderInfo on Poloniex

* linter errors fix

* switch interface type to avoid panic

* Poloniex has no para errror in OrderbookResponse - removed, added seq param (incrementing sequence) for future use

* linter issues fix

* linter issues fix

* dependencies update

* add tests

* refactored unmarshalling of GetAuthenticatedOrderStatus response

* test fix

* linter issues fix

* unmarshaling logic moved to GetAuthenticatedOrderStatus

* forced Status setting on GetAuthenticatedOrderStatus error

* comment edited

Co-authored-by: Vazha Bezhanishvili <vazha.bezhanishvili@elegro.eu>
This commit is contained in:
Vazha
2020-12-15 00:54:17 +02:00
committed by GitHub
parent ddd19ab6d9
commit 622e5dc8c8
11 changed files with 1801 additions and 1388 deletions

View File

@@ -851,8 +851,18 @@ func (s *RPCServer) GetOrder(_ context.Context, r *gctrpc.GetOrderRequest) (*gct
AssetType: result.Trades[i].Type.String(),
OrderSide: result.Trades[i].Side.String(),
Fee: result.Trades[i].Fee,
Total: result.Trades[i].Total,
})
}
var creationTime, updateTime int64
if result.Date.Unix() > 0 {
creationTime = result.Date.Unix()
}
if result.CloseTime.Unix() > 0 {
updateTime = result.CloseTime.Unix()
}
return &gctrpc.OrderDetails{
Exchange: result.Exchange,
Id: result.ID,
@@ -861,7 +871,7 @@ func (s *RPCServer) GetOrder(_ context.Context, r *gctrpc.GetOrderRequest) (*gct
AssetType: result.AssetType.String(),
OrderSide: result.Side.String(),
OrderType: result.Type.String(),
CreationTime: result.Date.Unix(),
CreationTime: creationTime,
Status: result.Status.String(),
Price: result.Price,
Amount: result.Amount,
@@ -869,7 +879,7 @@ func (s *RPCServer) GetOrder(_ context.Context, r *gctrpc.GetOrderRequest) (*gct
Fee: result.Fee,
Trades: trades,
Cost: result.Cost,
UpdateTime: result.CloseTime.Unix(),
UpdateTime: updateTime,
}, err
}

View File

@@ -196,6 +196,7 @@ type TradeHistory struct {
Timestamp time.Time
IsMaker bool
FeeAsset string
Total float64
}
// GetOrdersRequest used for GetOrderHistory and GetOpenOrders wrapper functions

View File

@@ -29,6 +29,8 @@ const (
poloniexDepositsWithdrawals = "returnDepositsWithdrawals"
poloniexOrders = "returnOpenOrders"
poloniexTradeHistory = "returnTradeHistory"
poloniexOrderTrades = "returnOrderTrades"
poloniexOrderStatus = "returnOrderStatus"
poloniexOrderCancel = "cancelOrder"
poloniexOrderMove = "moveOrder"
poloniexWithdraw = "withdraw"
@@ -418,6 +420,82 @@ func (p *Poloniex) GetAuthenticatedTradeHistory(start, end, limit int64) (Authen
return mainResult, json.Unmarshal(result, &mainResult.Data)
}
// GetAuthenticatedOrderStatus returns the status of a given orderId.
func (p *Poloniex) GetAuthenticatedOrderStatus(orderID string) (o OrderStatusData, err error) {
values := url.Values{}
if orderID == "" {
return o, fmt.Errorf("no orderID passed")
}
values.Set("orderNumber", orderID)
var rawOrderStatus OrderStatus
err = p.SendAuthenticatedHTTPRequest(http.MethodPost, poloniexOrderStatus, values, &rawOrderStatus)
if err != nil {
return o, err
}
switch rawOrderStatus.Success {
case 0: // fail
var errMsg GenericResponse
err = json.Unmarshal(rawOrderStatus.Result, &errMsg)
if err != nil {
return o, err
}
return o, fmt.Errorf(errMsg.Error)
case 1: // success
var status map[string]OrderStatusData
err = json.Unmarshal(rawOrderStatus.Result, &status)
if err != nil {
return o, err
}
for _, o = range status {
return o, err
}
}
return o, err
}
// GetAuthenticatedOrderTrades returns all trades involving a given orderId.
func (p *Poloniex) GetAuthenticatedOrderTrades(orderID string) (o []OrderTrade, err error) {
values := url.Values{}
if orderID == "" {
return nil, fmt.Errorf("no orderId passed")
}
values.Set("orderNumber", orderID)
var result json.RawMessage
err = p.SendAuthenticatedHTTPRequest(http.MethodPost, poloniexOrderTrades, values, &result)
if err != nil {
return nil, err
}
if len(result) == 0 {
return nil, fmt.Errorf("received unexpected response")
}
switch result[0] {
case '{': // error message received
var resp GenericResponse
err = json.Unmarshal(result, &resp)
if err != nil {
return nil, err
}
if resp.Error != "" {
err = fmt.Errorf(resp.Error)
}
case '[': // data received
err = json.Unmarshal(result, &o)
default:
return nil, fmt.Errorf("received unexpected response")
}
return o, err
}
// PlaceOrder places a new order on the exchange
func (p *Poloniex) PlaceOrder(currency string, rate, amount float64, immediate, fillOrKill, buy bool) (OrderResponse, error) {
result := OrderResponse{}

View File

@@ -2,6 +2,7 @@ package poloniex
import (
"net/http"
"strings"
"testing"
"time"
@@ -248,6 +249,109 @@ func TestGetOrderHistory(t *testing.T) {
}
}
func TestGetOrderStatus(t *testing.T) {
t.Parallel()
tests := []struct {
name string
mock bool
orderID string
errExpected bool
errMsgExpected string
}{
{
name: "correct order ID",
mock: true,
orderID: "96238912841",
errExpected: false,
errMsgExpected: "",
},
{
name: "wrong order ID",
mock: true,
orderID: "96238912842",
errExpected: true,
errMsgExpected: "Order not found",
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
if tt.mock != mockTests {
t.Skip()
}
_, err := p.GetAuthenticatedOrderStatus(tt.orderID)
switch {
case areTestAPIKeysSet() && err != nil:
t.Errorf("Could not get order status: %s", err)
case !areTestAPIKeysSet() && err == nil && !mockTests:
t.Error("Expecting an error when no keys are set")
case mockTests && err != nil:
if !tt.errExpected {
t.Errorf("Could not mock get order status: %s", err.Error())
} else if !(strings.Contains(err.Error(), tt.errMsgExpected)) {
t.Errorf("Could not mock get order status: %s", err.Error())
}
case mockTests:
if tt.errExpected {
t.Errorf("Mock get order status expect an error '%s', get no error", tt.errMsgExpected)
}
}
})
}
}
func TestGetOrderTrades(t *testing.T) {
t.Parallel()
tests := []struct {
name string
mock bool
orderID string
errExpected bool
errMsgExpected string
}{
{
name: "correct order ID",
mock: true,
orderID: "96238912841",
errExpected: false,
errMsgExpected: "",
},
{
name: "wrong order ID",
mock: true,
orderID: "96238912842",
errExpected: true,
errMsgExpected: "Order not found",
},
}
for _, tt := range tests {
tt := tt
t.Run(tt.name, func(t *testing.T) {
if tt.mock != mockTests {
t.Skip()
}
_, err := p.GetAuthenticatedOrderTrades(tt.orderID)
switch {
case areTestAPIKeysSet() && err != nil:
t.Errorf("Could not get order trades: %s", err)
case !areTestAPIKeysSet() && err == nil && !mockTests:
t.Error("Expecting an error when no keys are set")
case mockTests && err != nil:
if !(tt.errExpected && strings.Contains(err.Error(), tt.errMsgExpected)) {
t.Errorf("Could not mock get order trades: %s", err)
}
}
})
}
}
// Any tests below this line have the ability to impact your orders on the exchange. Enable canManipulateRealOrders to run them
// ----------------------------------------------------------------------------------------------------------------------------

View File

@@ -1,6 +1,7 @@
package poloniex
import (
"encoding/json"
"time"
"github.com/thrasher-corp/gocryptotrader/currency"
@@ -36,6 +37,7 @@ type OrderbookResponse struct {
Bids [][]interface{} `json:"bids"`
IsFrozen string `json:"isFrozen"`
Error string `json:"error"`
Seq int64 `json:"seq"`
}
// OrderbookItem holds data on an individual item
@@ -66,6 +68,39 @@ type TradeHistory struct {
Total float64 `json:"total,string"`
}
// OrderStatus holds order status data
type OrderStatus struct {
Result json.RawMessage `json:"result"`
Success int64 `json:"success"`
}
// OrderStatusData defines order status details
type OrderStatusData struct {
Pair string `json:"currencyPair"`
Rate float64 `json:"rate,string"`
Amount float64 `json:"amount,string"`
Total float64 `json:"total,string"`
StartingAmount float64 `json:"startingAmount,string"`
Type string `json:"type"`
Status string `json:"status"`
Date string `json:"date"`
Fee float64 `json:"fee,string"`
}
// OrderTrade holds order trade data
type OrderTrade struct {
Status string `json:"status"`
GlobalTradeID int64 `json:"globalTradeID"`
TradeID int64 `json:"tradeID"`
CurrencyPair string `json:"currencyPair"`
Type string `json:"type"`
Rate float64 `json:"rate,string"`
Amount float64 `json:"amount,string"`
Total float64 `json:"total,string"`
Fee float64 `json:"fee,string"`
Date string `json:"date"`
}
// ChartData holds kline data
type ChartData struct {
Date int64 `json:"date"`

View File

@@ -589,8 +589,64 @@ func (p *Poloniex) CancelAllOrders(_ *order.Cancel) (order.CancelAllResponse, er
// GetOrderInfo returns order information based on order ID
func (p *Poloniex) GetOrderInfo(orderID string, pair currency.Pair, assetType asset.Item) (order.Detail, error) {
var orderDetail order.Detail
return orderDetail, common.ErrNotYetImplemented
orderInfo := order.Detail{
Exchange: p.Name,
Pair: pair,
}
trades, err := p.GetAuthenticatedOrderTrades(orderID)
if err != nil && !strings.Contains(err.Error(), "Order not found") {
return orderInfo, err
}
for i := range trades {
var tradeHistory order.TradeHistory
tradeHistory.Exchange = p.Name
tradeHistory.Side, err = order.StringToOrderSide(trades[i].Type)
if err != nil {
return orderInfo, err
}
tradeHistory.TID = strconv.FormatInt(trades[i].GlobalTradeID, 10)
tradeHistory.Timestamp, err = time.Parse(common.SimpleTimeFormat, trades[i].Date)
if err != nil {
return orderInfo, err
}
tradeHistory.Price = trades[i].Rate
tradeHistory.Amount = trades[i].Amount
tradeHistory.Total = trades[i].Total
tradeHistory.Fee = trades[i].Fee
orderInfo.Trades = append(orderInfo.Trades, tradeHistory)
}
resp, err := p.GetAuthenticatedOrderStatus(orderID)
if err != nil {
if len(orderInfo.Trades) > 0 { // on closed orders return trades only
if strings.Contains(err.Error(), "Order not found") {
orderInfo.Status = order.Closed
}
return orderInfo, nil
}
return orderInfo, err
}
orderInfo.Status, _ = order.StringToOrderStatus(resp.Status)
orderInfo.Price = resp.Rate
orderInfo.Amount = resp.Amount
orderInfo.Cost = resp.Total
orderInfo.Fee = resp.Fee
orderInfo.TargetAmount = resp.StartingAmount
orderInfo.Side, err = order.StringToOrderSide(resp.Type)
if err != nil {
return orderInfo, err
}
orderInfo.Date, err = time.Parse(common.SimpleTimeFormat, resp.Date)
if err != nil {
return orderInfo, err
}
return orderInfo, nil
}
// GetDepositAddress returns a deposit address for a specified currency

File diff suppressed because it is too large Load Diff

View File

@@ -309,6 +309,7 @@ message TradeHistory {
string asset_type = 6;
string order_side = 7;
double fee = 8;
double total = 9;
}
message GetOrdersRequest {

View File

@@ -4113,6 +4113,10 @@
"fee": {
"type": "number",
"format": "double"
},
"total": {
"type": "number",
"format": "double"
}
}
},

11
go.sum
View File

@@ -244,22 +244,20 @@ github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
github.com/lib/pq v1.8.0 h1:9xohqzkUwzR4Ga4ivdTcawVS89YSDVxXMa3xJX3cGzg=
github.com/lib/pq v1.8.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/lib/pq v1.9.0 h1:L8nSXQQzAYByakOFMTwpjRoHsMJklur4Gi59b6VivR8=
github.com/lib/pq v1.9.0/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/magiconair/properties v1.8.1 h1:ZC2Vc7/ZFkGmsVC9KvOjumD+G5lXy2RtTKyzRKO2BQ4=
github.com/magiconair/properties v1.8.1/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.3/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/mattn/go-sqlite3 v1.14.4 h1:4rQjbDxdu9fSgI/r3KN72G3c2goxknAqHHgPWWs8UlI=
github.com/mattn/go-sqlite3 v1.14.4/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI=
github.com/mattn/go-sqlite3 v1.14.5 h1:1IdxlwTNazvbKJQSxoJ5/9ECbEeaTTyeU7sEAZ5KKTQ=
github.com/mattn/go-sqlite3 v1.14.5/go.mod h1:WVKg1VTActs4Qso6iwGbiFih2UIHo0ENGwNd0Lj+XmI=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/miekg/dns v1.0.14/go.mod h1:W1PPwlIAgtquWBMBEV9nkV9Cazfe8ScdGz/Lj7v3Nrg=
github.com/mitchellh/cli v1.0.0/go.mod h1:hNIlj7HEI86fIcpObd7a0FcrxTWetlwJDGcceTlRvqc=
github.com/mitchellh/go-homedir v1.0.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-homedir v1.1.0 h1:lukF9ziXFxDFPkA1vsr5zpc1XuPDn/wFntq5mG+4E0Y=
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
github.com/mitchellh/go-testing-interface v1.0.0/go.mod h1:kRemZodwjscx+RGhAo8eIhFbs2+BFgRtFPeD/KE+zxI=
github.com/mitchellh/gox v0.4.0/go.mod h1:Sd9lOJ0+aimLBi73mGofS1ycjY8lL3uZM3JPS42BGNg=
@@ -436,6 +434,7 @@ golang.org/x/mod v0.1.0/go.mod h1:0QHyrYULN0/3qlju5TqG8bIK38QM8yzMo5ekMj3DlcY=
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
golang.org/x/mod v0.2.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/mod v0.3.0 h1:RM4zey1++hCTbCVQfnWeKs9/IEsaBLA8vTkd0WVtmH4=
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
golang.org/x/net v0.0.0-20180724234803-3673e40ba225/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
golang.org/x/net v0.0.0-20180826012351-8a410e7b638d/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
@@ -582,6 +581,7 @@ golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roY
golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200806022845-90696ccdc692/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d h1:W07d4xkoAUSNOkOzdzXCdFGxT7o2rW4q8M34tB2i//k=
golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA=
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
@@ -665,8 +665,7 @@ google.golang.org/grpc v1.31.0 h1:T7P4R73V3SSDPhH7WW7ATbfViLtmamH0DKrP3f9AuDI=
google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak=
google.golang.org/grpc v1.33.1 h1:DGeFlSan2f+WEtCERJ4J9GJWk15TxUi8QGagfI87Xyc=
google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0=
google.golang.org/grpc v1.33.2 h1:EQyQC3sa8M+p6Ulc8yy9SWSS2GVwyRc83gAbG8lrl4o=
google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc=
google.golang.org/grpc v1.34.0 h1:raiipEjMOIC/TO2AvyTxP25XFdLxNIBwzDh3FM3XztI=
google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0 h1:lQ+dE99pFsb8osbJB3oRfE5eW4Hx6a/lZQr8Jh+eoT4=
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.0.0/go.mod h1:6Kw0yEErY5E/yWrBtf03jp27GLLJujG4z/JK95pnjjw=

View File

@@ -10060,6 +10060,113 @@
"09c436ba3cbb06aa182ea43f85e368258d3da18fc948ca980d431cf2779f7626226129ce3482ebbeb7a0804c1b0a1155a977d6f79fff5fadedb2199f900d6a07"
]
}
},
{
"data": [
{
"globalTradeID": 394127362,
"tradeID": 13536351,
"currencyPair": "BTC_STR",
"type": "buy",
"rate": "0.00003432",
"amount": "3696.05342780",
"total": "0.12684855",
"fee": "0.00200000",
"date": "2018-10-16 17:03:43"
},
{
"globalTradeID": 394127361,
"tradeID": 13536350,
"currencyPair": "BTC_STR",
"type": "buy",
"rate": "0.00003432",
"amount": "3600.53748129",
"total": "0.12357044",
"fee": "0.00200000",
"date": "2018-10-16 17:03:43"
}
],
"queryString": "",
"bodyParams": "command=returnOrderTrades\u0026nonce=1594157624217368019\u0026orderNumber=96238912841",
"headers": {
"Content-Type": [
"application/x-www-form-urlencoded"
],
"Key": [
""
],
"Sign": [
"db30a451e3277242dd56ba0d0f73e1ca58b6b6891afbc8a5ae13c388a95ffd6ae6f6e63d0b6915e481f35bfcc84b3c73395666f28e76912c7178a440d46de43c"
]
}
},
{
"data": {
"error": "Order not found, or you are not the person who placed it."
},
"queryString": "",
"bodyParams": "command=returnOrderTrades\u0026nonce=1594157624217368020\u0026orderNumber=96238912842",
"headers": {
"Content-Type": [
"application/x-www-form-urlencoded"
],
"Key": [
""
],
"Sign": [
"db30a451e3277242dd56ba0d0f73e1ca58b6b6891afbc8a5ae13c388a95ffd6ae6f6e63d0b6915e481f35bfcc84b3c73395666f28e76912c7178a440d46de43c"
]
}
},
{
"data": {
"result":{
"6071071":{
"status":"Open",
"rate":"0.40000000",
"amount":"1.00000000",
"currencyPair":"BTC_ETH",
"date":"2018-10-17 17:04:50",
"total":"0.40000000",
"type":"buy",
"startingAmount":"1.00000"
}
},
"success":1
},
"queryString": "",
"bodyParams": "command=returnOrderStatus\u0026nonce=1594157624217368022\u0026orderNumber=96238912841",
"headers": {
"Content-Type": [
"application/x-www-form-urlencoded"
],
"Key": [
""
],
"Sign": [
"db30a451e3277242dd56ba0d0f73e1ca58b6b6891afbc8a5ae13c388a95ffd6ae6f6e63d0b6915e481f35bfcc84b3c73395666f28e76912c7178a440d46de43c"
]
}
},
{
"data": {
"result":{
"error": "Order not found, or you are not the person who placed it."
}
},
"queryString": "",
"bodyParams": "command=returnOrderStatus\u0026nonce=1594157624217368022\u0026orderNumber=96238912842",
"headers": {
"Content-Type": [
"application/x-www-form-urlencoded"
],
"Key": [
""
],
"Sign": [
"db30a451e3277242dd56ba0d0f73e1ca58b6b6891afbc8a5ae13c388a95ffd6ae6f6e63d0b6915e481f35bfcc84b3c73395666f28e76912c7178a440d46de43c"
]
}
}
]
}