[go: up one dir, main page]

Skip to content

Commit

Permalink
add more status enum for LedgerRecord; add auto_size in FuturesOrder
Browse files Browse the repository at this point in the history
  • Loading branch information
revilwang committed Sep 29, 2021
1 parent e0c9e25 commit a193806
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 10 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ APIv4 provides spot, margin and futures trading operations. There are public API
## Overview
This API client was generated by the [OpenAPI Generator](https://openapi-generator.tech) project. By using the [OpenAPI-spec](https://www.openapis.org/) from a remote server, you can easily generate an API client.

- API version: 4.22.1
- Package version: 6.22.1
- API version: 4.22.2
- Package version: 6.22.2
- Build package: org.openapitools.codegen.languages.GoClientCodegen
For more information, please visit [https://www.gate.io/page/contacts](https://www.gate.io/page/contacts)

Expand Down
4 changes: 2 additions & 2 deletions api_spot.go
Original file line number Diff line number Diff line change
Expand Up @@ -1194,7 +1194,7 @@ type ListOrdersOpts struct {

/*
ListOrders List orders
Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported.
Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported. Time range parameters are handled as order finish time.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param currencyPair Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones.
* @param status List orders based on status `open` - order is waiting to be filled `finished` - order has been filled or cancelled
Expand Down Expand Up @@ -1826,7 +1826,7 @@ type ListMyTradesOpts struct {

/*
ListMyTrades List personal trading history
Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range
Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range Time range parameters are handled as order finish time.
* @param ctx context.Context - for authentication, logging, cancellation, deadlines, tracing, etc. Passed from http.Request or context.Background().
* @param currencyPair Retrieve results with specified currency pair. It is required for open orders, but optional for finished ones.
* @param optional nil or *ListMyTradesOpts - Optional Parameters:
Expand Down
2 changes: 1 addition & 1 deletion configuration.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ func NewConfiguration() *Configuration {
cfg := &Configuration{
BasePath: "https://api.gateio.ws/api/v4",
DefaultHeader: make(map[string]string),
UserAgent: "OpenAPI-Generator/6.22.1/go",
UserAgent: "OpenAPI-Generator/6.22.2/go",
Debug: false,
Servers: []ServerConfiguration{
{
Expand Down
1 change: 1 addition & 0 deletions docs/FuturesOrder.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Name | Type | Description | Notes
**Tkfr** | **string** | Taker fee | [optional] [readonly]
**Mkfr** | **string** | Maker fee | [optional] [readonly]
**Refu** | **int32** | Reference user ID | [optional] [readonly]
**AutoSize** | **string** | Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0 | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)

Expand Down
2 changes: 1 addition & 1 deletion docs/LedgerRecord.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Name | Type | Description | Notes
**Currency** | **string** | Currency name |
**Address** | **string** | Withdrawal address. Required for withdrawals | [optional]
**Memo** | **string** | Additional remarks with regards to the withdrawal | [optional]
**Status** | **string** | Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation | [optional] [readonly]
**Status** | **string** | Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail | [optional] [readonly]
**Chain** | **string** | Name of the chain used in withdrawals | [optional]

[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
Expand Down
4 changes: 2 additions & 2 deletions docs/SpotApi.md
Original file line number Diff line number Diff line change
Expand Up @@ -882,7 +882,7 @@ func main() {
List orders

Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported.
Spot and margin orders are returned by default. If cross margin orders are needed, `account` must be set to `cross_margin` When `status` is `open`, i.e., listing open orders, only pagination parameters `page` and `limit` are supported and `limit` cannot be larger than 100. Query by `side` and time range parameters `from` and `to` are not supported. When `status` is `finished`, i.e., listing finished orders, pagination parameters, time range parameters `from` and `to`, and `side` parameters are all supported. Time range parameters are handled as order finish time.

### Required Parameters

Expand Down Expand Up @@ -1356,7 +1356,7 @@ func main() {
List personal trading history

Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range
Spot and margin trades are queried by default. If cross margin trades are needed, `account` must be set to `cross_margin` You can also set `from` and(or) `to` to query by time range Time range parameters are handled as order finish time.

### Required Parameters

Expand Down
2 changes: 2 additions & 0 deletions model_futures_order.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,6 @@ type FuturesOrder struct {
Mkfr string `json:"mkfr,omitempty"`
// Reference user ID
Refu int32 `json:"refu,omitempty"`
// Set side to close dual-mode position. `close_long` closes the long side; while `close_short` the short one. Note `size` also needs to be set to 0
AutoSize string `json:"auto_size,omitempty"`
}
2 changes: 1 addition & 1 deletion model_ledger_record.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ type LedgerRecord struct {
Address string `json:"address,omitempty"`
// Additional remarks with regards to the withdrawal
Memo string `json:"memo,omitempty"`
// Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation
// Record status. - DONE: done - CANCEL: cancelled - REQUEST: requesting - MANUAL: pending manual approval - BCODE: GateCode operation - EXTPEND: pending confirm after sending - FAIL: pending confirm when fail
Status string `json:"status,omitempty"`
// Name of the chain used in withdrawals
Chain string `json:"chain,omitempty"`
Expand Down
2 changes: 1 addition & 1 deletion model_total_balance.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

package gateapi

// 用户总资产信息
// User's balance in all accounts
type TotalBalance struct {
Total AccountBalance `json:"total,omitempty"`
// Total balances in different accounts - cross_margin: cross margin account - spot: spot account - finance: finance account - margin: margin account - quant: quant account - futures: futures account - delivery: delivery account - warrant: warrant account - cbbc: cbbc account
Expand Down

0 comments on commit a193806

Please sign in to comment.