Skip to content

Commit

Permalink
Release: v1.0.33-alpha
Browse files Browse the repository at this point in the history
  • Loading branch information
amir-the-h committed Mar 19, 2023
1 parent 593fb14 commit ac2d8a1
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@ Changelog
=========
All notable changes to this project will be documented in this file.

v1.0.33-alpha
-------------

### Changed

- Added WS trade requests

v1.0.32-alpha
-------------

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion api/ws/trade.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package ws

import (
"github.com/amir-the-h/okex"
requests "github.com/amir-the-h/okex/requests/rest/trade"
requests "github.com/amir-the-h/okex/requests/ws/trade"
)

// Trade
Expand Down
37 changes: 37 additions & 0 deletions requests/ws/trade/trade_requests.go
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"`
}
)

0 comments on commit ac2d8a1

Please sign in to comment.