|
8 | 8 | "github.com/thrasher-corp/gocryptotrader/currency"
|
9 | 9 | "github.com/thrasher-corp/gocryptotrader/encoding/json"
|
10 | 10 | "github.com/thrasher-corp/gocryptotrader/exchanges/asset"
|
| 11 | + "github.com/thrasher-corp/gocryptotrader/exchanges/order" |
11 | 12 | "github.com/thrasher-corp/gocryptotrader/types"
|
12 | 13 | )
|
13 | 14 |
|
@@ -440,31 +441,31 @@ type CancelOrderResponse struct {
|
440 | 441 |
|
441 | 442 | // QueryOrderData holds query order data
|
442 | 443 | type QueryOrderData struct {
|
443 |
| - Code int `json:"code"` |
444 |
| - Msg string `json:"msg"` |
445 |
| - Symbol string `json:"symbol"` |
446 |
| - OrderID int64 `json:"orderId"` |
447 |
| - ClientOrderID string `json:"clientOrderId"` |
448 |
| - Price float64 `json:"price,string"` |
449 |
| - OrigQty float64 `json:"origQty,string"` |
450 |
| - ExecutedQty float64 `json:"executedQty,string"` |
451 |
| - Status string `json:"status"` |
452 |
| - TimeInForce string `json:"timeInForce"` |
453 |
| - Type string `json:"type"` |
454 |
| - Side string `json:"side"` |
455 |
| - StopPrice float64 `json:"stopPrice,string"` |
456 |
| - IcebergQty float64 `json:"icebergQty,string"` |
457 |
| - Time types.Time `json:"time"` |
458 |
| - IsWorking bool `json:"isWorking"` |
459 |
| - CummulativeQuoteQty float64 `json:"cummulativeQuoteQty,string"` |
460 |
| - OrderListID int64 `json:"orderListId"` |
461 |
| - OrigQuoteOrderQty float64 `json:"origQuoteOrderQty,string"` |
462 |
| - UpdateTime types.Time `json:"updateTime"` |
| 444 | + Code int `json:"code"` |
| 445 | + Msg string `json:"msg"` |
| 446 | + Symbol string `json:"symbol"` |
| 447 | + OrderID int64 `json:"orderId"` |
| 448 | + ClientOrderID string `json:"clientOrderId"` |
| 449 | + Price float64 `json:"price,string"` |
| 450 | + OrigQty float64 `json:"origQty,string"` |
| 451 | + ExecutedQty float64 `json:"executedQty,string"` |
| 452 | + Status order.Status `json:"status"` |
| 453 | + TimeInForce string `json:"timeInForce"` |
| 454 | + Type order.Type `json:"type"` |
| 455 | + Side order.Side `json:"side"` |
| 456 | + StopPrice float64 `json:"stopPrice,string"` |
| 457 | + IcebergQty float64 `json:"icebergQty,string"` |
| 458 | + Time types.Time `json:"time"` |
| 459 | + IsWorking bool `json:"isWorking"` |
| 460 | + CummulativeQuoteQty float64 `json:"cummulativeQuoteQty,string"` |
| 461 | + OrderListID int64 `json:"orderListId"` |
| 462 | + OrigQuoteOrderQty float64 `json:"origQuoteOrderQty,string"` |
| 463 | + UpdateTime types.Time `json:"updateTime"` |
463 | 464 | }
|
464 | 465 |
|
465 | 466 | // Balance holds query order data
|
466 | 467 | type Balance struct {
|
467 |
| - Asset string `json:"asset"` |
| 468 | + Asset currency.Code `json:"asset"` |
468 | 469 | Free decimal.Decimal `json:"free"`
|
469 | 470 | Locked decimal.Decimal `json:"locked"`
|
470 | 471 | }
|
@@ -496,12 +497,12 @@ type MarginAccount struct {
|
496 | 497 |
|
497 | 498 | // MarginAccountAsset holds each individual margin account asset
|
498 | 499 | type MarginAccountAsset struct {
|
499 |
| - Asset string `json:"asset"` |
500 |
| - Borrowed float64 `json:"borrowed,string"` |
501 |
| - Free float64 `json:"free,string"` |
502 |
| - Interest float64 `json:"interest,string"` |
503 |
| - Locked float64 `json:"locked,string"` |
504 |
| - NetAsset float64 `json:"netAsset,string"` |
| 500 | + Asset currency.Code `json:"asset"` |
| 501 | + Borrowed float64 `json:"borrowed,string"` |
| 502 | + Free float64 `json:"free,string"` |
| 503 | + Interest float64 `json:"interest,string"` |
| 504 | + Locked float64 `json:"locked,string"` |
| 505 | + NetAsset float64 `json:"netAsset,string"` |
505 | 506 | }
|
506 | 507 |
|
507 | 508 | // RequestParamsOrderType trade order type
|
@@ -729,18 +730,18 @@ type WithdrawResponse struct {
|
729 | 730 |
|
730 | 731 | // WithdrawStatusResponse defines a withdrawal status response
|
731 | 732 | type WithdrawStatusResponse struct {
|
732 |
| - Address string `json:"address"` |
733 |
| - Amount float64 `json:"amount,string"` |
734 |
| - ApplyTime types.Time `json:"applyTime"` |
735 |
| - Coin string `json:"coin"` |
736 |
| - ID string `json:"id"` |
737 |
| - WithdrawOrderID string `json:"withdrawOrderId"` |
738 |
| - Network string `json:"network"` |
739 |
| - TransferType uint8 `json:"transferType"` |
740 |
| - Status int64 `json:"status"` |
741 |
| - TransactionFee float64 `json:"transactionFee,string"` |
742 |
| - TransactionID string `json:"txId"` |
743 |
| - ConfirmNumber int64 `json:"confirmNo"` |
| 733 | + Address string `json:"address"` |
| 734 | + Amount float64 `json:"amount,string"` |
| 735 | + ApplyTime types.Time `json:"applyTime"` |
| 736 | + Coin currency.Code `json:"coin"` |
| 737 | + ID string `json:"id"` |
| 738 | + WithdrawOrderID string `json:"withdrawOrderId"` |
| 739 | + Network string `json:"network"` |
| 740 | + TransferType uint8 `json:"transferType"` |
| 741 | + Status int64 `json:"status"` |
| 742 | + TransactionFee float64 `json:"transactionFee,string"` |
| 743 | + TransactionID string `json:"txId"` |
| 744 | + ConfirmNumber int64 `json:"confirmNo"` |
744 | 745 | }
|
745 | 746 |
|
746 | 747 | // DepositAddress stores the deposit address info
|
@@ -799,39 +800,39 @@ type WsBalanceUpdateData struct {
|
799 | 800 |
|
800 | 801 | // WsOrderUpdateData defines websocket account order update data
|
801 | 802 | type WsOrderUpdateData struct {
|
802 |
| - EventType string `json:"e"` |
803 |
| - EventTime types.Time `json:"E"` |
804 |
| - Symbol string `json:"s"` |
805 |
| - ClientOrderID string `json:"c"` |
806 |
| - Side string `json:"S"` |
807 |
| - OrderType string `json:"o"` |
808 |
| - TimeInForce string `json:"f"` |
809 |
| - Quantity float64 `json:"q,string"` |
810 |
| - Price float64 `json:"p,string"` |
811 |
| - StopPrice float64 `json:"P,string"` |
812 |
| - IcebergQuantity float64 `json:"F,string"` |
813 |
| - OrderListID int64 `json:"g"` |
814 |
| - CancelledClientOrderID string `json:"C"` |
815 |
| - CurrentExecutionType string `json:"x"` |
816 |
| - OrderStatus string `json:"X"` |
817 |
| - RejectionReason string `json:"r"` |
818 |
| - OrderID int64 `json:"i"` |
819 |
| - LastExecutedQuantity float64 `json:"l,string"` |
820 |
| - CumulativeFilledQuantity float64 `json:"z,string"` |
821 |
| - LastExecutedPrice float64 `json:"L,string"` |
822 |
| - Commission float64 `json:"n,string"` |
823 |
| - CommissionAsset string `json:"N"` |
824 |
| - TransactionTime types.Time `json:"T"` |
825 |
| - TradeID int64 `json:"t"` |
826 |
| - Ignored int64 `json:"I"` // Must be ignored explicitly, otherwise it overwrites 'i'. |
827 |
| - IsOnOrderBook bool `json:"w"` |
828 |
| - IsMaker bool `json:"m"` |
829 |
| - Ignored2 bool `json:"M"` // See the comment for "I". |
830 |
| - OrderCreationTime types.Time `json:"O"` |
831 |
| - WorkingTime types.Time `json:"W"` |
832 |
| - CumulativeQuoteTransactedQuantity float64 `json:"Z,string"` |
833 |
| - LastQuoteAssetTransactedQuantity float64 `json:"Y,string"` |
834 |
| - QuoteOrderQuantity float64 `json:"Q,string"` |
| 803 | + EventType string `json:"e"` |
| 804 | + EventTime types.Time `json:"E"` |
| 805 | + Symbol string `json:"s"` |
| 806 | + ClientOrderID string `json:"c"` |
| 807 | + Side order.Side `json:"S"` |
| 808 | + OrderType order.Type `json:"o"` |
| 809 | + TimeInForce string `json:"f"` |
| 810 | + Quantity float64 `json:"q,string"` |
| 811 | + Price float64 `json:"p,string"` |
| 812 | + StopPrice float64 `json:"P,string"` |
| 813 | + IcebergQuantity float64 `json:"F,string"` |
| 814 | + OrderListID int64 `json:"g"` |
| 815 | + CancelledClientOrderID string `json:"C"` |
| 816 | + CurrentExecutionType string `json:"x"` |
| 817 | + OrderStatus order.Status `json:"X"` |
| 818 | + RejectionReason string `json:"r"` |
| 819 | + OrderID int64 `json:"i"` |
| 820 | + LastExecutedQuantity float64 `json:"l,string"` |
| 821 | + CumulativeFilledQuantity float64 `json:"z,string"` |
| 822 | + LastExecutedPrice float64 `json:"L,string"` |
| 823 | + Commission float64 `json:"n,string"` |
| 824 | + CommissionAsset currency.Code `json:"N"` |
| 825 | + TransactionTime types.Time `json:"T"` |
| 826 | + TradeID int64 `json:"t"` |
| 827 | + Ignored int64 `json:"I"` // Must be ignored explicitly, otherwise it overwrites 'i'. |
| 828 | + IsOnOrderBook bool `json:"w"` |
| 829 | + IsMaker bool `json:"m"` |
| 830 | + Ignored2 bool `json:"M"` // See the comment for "I". |
| 831 | + OrderCreationTime types.Time `json:"O"` |
| 832 | + WorkingTime types.Time `json:"W"` |
| 833 | + CumulativeQuoteTransactedQuantity float64 `json:"Z,string"` |
| 834 | + LastQuoteAssetTransactedQuantity float64 `json:"Y,string"` |
| 835 | + QuoteOrderQuantity float64 `json:"Q,string"` |
835 | 836 | }
|
836 | 837 |
|
837 | 838 | // WsListStatusData defines websocket account listing status data
|
|
0 commit comments