forked from c9s/bbgo
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
pkg/exchange: gen 3 day and regen history transaction api
- Loading branch information
1 parent
747b75f
commit 38bd547
Showing
7 changed files
with
489 additions
and
13 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
39 changes: 39 additions & 0 deletions
39
pkg/exchange/okex/okexapi/get_three_days_transaction_history_request.go
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,39 @@ | ||
package okexapi | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/c9s/requestgen" | ||
) | ||
|
||
//go:generate -command GetRequest requestgen -method GET -responseType .APIResponse -responseDataField Data | ||
//go:generate -command PostRequest requestgen -method POST -responseType .APIResponse -responseDataField Data | ||
|
||
//go:generate GetRequest -url "/api/v5/trade/fills" -type GetThreeDaysTransactionHistoryRequest -responseDataType []Trade -rateLimiter 1+60/2s | ||
type GetThreeDaysTransactionHistoryRequest struct { | ||
client requestgen.AuthenticatedAPIClient | ||
|
||
instrumentType InstrumentType `param:"instType,query"` | ||
instrumentID *string `param:"instId,query"` | ||
orderID *string `param:"ordId,query"` | ||
|
||
underlying *string `param:"uly,query"` | ||
instrumentFamily *string `param:"instFamily,query"` | ||
|
||
after *string `param:"after,query"` | ||
before *string `param:"before,query"` | ||
startTime *time.Time `param:"begin,query,milliseconds"` | ||
|
||
// endTime for each request, startTime and endTime can be any interval, but should be in last 3 months | ||
endTime *time.Time `param:"end,query,milliseconds"` | ||
|
||
// limit for data size per page. Default: 100 | ||
limit *uint64 `param:"limit,query"` | ||
} | ||
|
||
func (c *RestClient) NewGetThreeDaysTransactionHistoryRequest() *GetThreeDaysTransactionHistoryRequest { | ||
return &GetThreeDaysTransactionHistoryRequest{ | ||
client: c, | ||
instrumentType: InstrumentTypeSpot, | ||
} | ||
} |
322 changes: 322 additions & 0 deletions
322
pkg/exchange/okex/okexapi/get_three_days_transaction_history_request_requestgen.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.