-
Notifications
You must be signed in to change notification settings - Fork 102
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
593fb14
commit ac2d8a1
Showing
4 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,7 +25,7 @@ Installation | |
----------------- | ||
|
||
```bash | ||
go get github.com/amir-the-h/[email protected].31-alpha | ||
go get github.com/amir-the-h/[email protected].33-alpha | ||
``` | ||
|
||
Usage | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
package trade | ||
|
||
import "github.com/amir-the-h/okex" | ||
|
||
type ( | ||
PlaceOrder struct { | ||
ID string `json:"-"` | ||
InstID string `json:"instId"` | ||
Ccy string `json:"ccy,omitempty"` | ||
ClOrdID string `json:"clOrdId,omitempty"` | ||
Tag string `json:"tag,omitempty"` | ||
ReduceOnly bool `json:"reduceOnly,omitempty"` | ||
Sz float64 `json:"sz,string"` | ||
Px float64 `json:"px,omitempty,string"` | ||
TdMode okex.TradeMode `json:"tdMode"` | ||
Side okex.OrderSide `json:"side"` | ||
PosSide okex.PositionSide `json:"posSide,omitempty"` | ||
OrdType okex.OrderType `json:"ordType"` | ||
TgtCcy okex.QuantityType `json:"tgtCcy,omitempty"` | ||
} | ||
CancelOrder struct { | ||
ID string `json:"-"` | ||
InstID string `json:"instId"` | ||
OrdID string `json:"ordId,omitempty"` | ||
ClOrdID string `json:"clOrdId,omitempty"` | ||
} | ||
AmendOrder struct { | ||
ID string `json:"-"` | ||
InstID string `json:"instId"` | ||
OrdID string `json:"ordId,omitempty"` | ||
ClOrdID string `json:"clOrdId,omitempty"` | ||
ReqID string `json:"reqId,omitempty"` | ||
NewSz int64 `json:"newSz,omitempty,string"` | ||
NewPx float64 `json:"newPx,omitempty,string"` | ||
CxlOnFail bool `json:"cxlOnFail,omitempty"` | ||
} | ||
) |