All URIs are relative to https://api.gateio.ws/api/v4
Method | HTTP request | Description |
---|---|---|
ListMultiCollateralOrders | Get /loan/multi_collateral/orders | List Multi-Collateral Orders |
CreateMultiCollateral | Post /loan/multi_collateral/orders | Create Multi-Collateral Order |
GetMultiCollateralOrderDetail | Get /loan/multi_collateral/orders/{order_id} | Get Multi-Collateral Order Detail |
ListMultiRepayRecords | Get /loan/multi_collateral/repay | List Multi-Collateral Repay Records |
RepayMultiCollateralLoan | Post /loan/multi_collateral/repay | Repay Multi-Collateral Loan |
ListMultiCollateralRecords | Get /loan/multi_collateral/mortgage | Query collateral adjustment records |
OperateMultiCollateral | Post /loan/multi_collateral/mortgage | Operate Multi-Collateral |
ListUserCurrencyQuota | Get /loan/multi_collateral/currency_quota | List User Currency Quota |
ListMultiCollateralCurrencies | Get /loan/multi_collateral/currencies | Query supported borrowing and collateral currencies in Multi-Collateral |
GetMultiCollateralLtv | Get /loan/multi_collateral/ltv | Get Multi-Collateral ratio |
GetMultiCollateralFixRate | Get /loan/multi_collateral/fixed_rate | Query fixed interest rates for the currency for 7 days and 30 days |
[]MultiCollateralOrder ListMultiCollateralOrders(ctx, optional)
List Multi-Collateral Orders
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | ListMultiCollateralOrdersOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a ListMultiCollateralOrdersOpts struct
Name | Type | Description | Notes |
---|---|---|---|
page | optional.Int32 | Page number | [default to 1] |
limit | optional.Int32 | Maximum number of records to be returned in a single list | [default to 10] |
sort | optional.String | Sort types: time_desc - default sorting by creation time in descending order, ltv_asc - ascending order of ltv, ltv_desc - descending order of ltv. | |
orderType | optional.String | Order type, current - query current orders, fixed - query fixed orders. If not specified, default to querying current orders |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
result, _, err := client.MultiCollateralLoanApi.ListMultiCollateralOrders(ctx, nil)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
OrderResp CreateMultiCollateral(ctx, createMultiCollateralOrder)
Create Multi-Collateral Order
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
createMultiCollateralOrder | CreateMultiCollateralOrder |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
createMultiCollateralOrder := gateapi.CreateMultiCollateralOrder{} // CreateMultiCollateralOrder -
result, _, err := client.MultiCollateralLoanApi.CreateMultiCollateral(ctx, createMultiCollateralOrder)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MultiCollateralOrder GetMultiCollateralOrderDetail(ctx, orderId)
Get Multi-Collateral Order Detail
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
orderId | string | Order ID returned on successful order creation |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
orderId := "12345" // string - Order ID returned on successful order creation
result, _, err := client.MultiCollateralLoanApi.GetMultiCollateralOrderDetail(ctx, orderId)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]MultiRepayRecord ListMultiRepayRecords(ctx, type_, optional)
List Multi-Collateral Repay Records
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
type_ | string | Operation type: repay - Regular repayment, liquidate - Liquidation | |
optional | ListMultiRepayRecordsOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a ListMultiRepayRecordsOpts struct
Name | Type | Description | Notes |
---|---|---|---|
borrowCurrency | optional.String | Borrowed currency | |
page | optional.Int32 | Page number | [default to 1] |
limit | optional.Int32 | Maximum number of records to be returned in a single list | [default to 10] |
from | optional.Int64 | Start timestamp of the query | |
to | optional.Int64 | Time range ending, default to current time |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
type_ := "repay" // string - Operation type: repay - Regular repayment, liquidate - Liquidation
result, _, err := client.MultiCollateralLoanApi.ListMultiRepayRecords(ctx, type_, nil)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MultiRepayResp RepayMultiCollateralLoan(ctx, repayMultiLoan)
Repay Multi-Collateral Loan
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
repayMultiLoan | RepayMultiLoan |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
repayMultiLoan := gateapi.RepayMultiLoan{} // RepayMultiLoan -
result, _, err := client.MultiCollateralLoanApi.RepayMultiCollateralLoan(ctx, repayMultiLoan)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]MultiCollateralRecord ListMultiCollateralRecords(ctx, optional)
Query collateral adjustment records
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
optional | ListMultiCollateralRecordsOpts | optional parameters | nil if no parameters |
Optional parameters are passed through a pointer to a ListMultiCollateralRecordsOpts struct
Name | Type | Description | Notes |
---|---|---|---|
page | optional.Int32 | Page number | [default to 1] |
limit | optional.Int32 | Maximum number of records to be returned in a single list | [default to 10] |
from | optional.Int64 | Start timestamp of the query | |
to | optional.Int64 | Time range ending, default to current time | |
collateralCurrency | optional.String | Collateral |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
result, _, err := client.MultiCollateralLoanApi.ListMultiCollateralRecords(ctx, nil)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CollateralAdjustRes OperateMultiCollateral(ctx, collateralAdjust)
Operate Multi-Collateral
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
collateralAdjust | CollateralAdjust |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
collateralAdjust := gateapi.CollateralAdjust{} // CollateralAdjust -
result, _, err := client.MultiCollateralLoanApi.OperateMultiCollateral(ctx, collateralAdjust)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}
- Content-Type: application/json
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]CurrencyQuota ListUserCurrencyQuota(ctx, type_, currency)
List User Currency Quota
Name | Type | Description | Notes |
---|---|---|---|
ctx | context.Context | context for authentication, logging, cancellation, deadlines, tracing, etc. | |
type_ | string | Currency types: collateral - collateral currency, borrow - borrowing currency. | |
currency | string | When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided. |
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.WithValue(context.Background(),
gateapi.ContextGateAPIV4,
gateapi.GateAPIV4{
Key: "YOUR_API_KEY",
Secret: "YOUR_API_SECRET",
}
)
type_ := "collateral" // string - Currency types: collateral - collateral currency, borrow - borrowing currency.
currency := "BTC" // string - When specifying collateral currencies, you can use commas to separate multiple currencies; for borrowing currencies, only one currency can be provided.
result, _, err := client.MultiCollateralLoanApi.ListUserCurrencyQuota(ctx, type_, currency)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
MultiCollateralCurrency ListMultiCollateralCurrencies(ctx, )
Query supported borrowing and collateral currencies in Multi-Collateral
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.Background()
result, _, err := client.MultiCollateralLoanApi.ListMultiCollateralCurrencies(ctx)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
CollateralLtv GetMultiCollateralLtv(ctx, )
Get Multi-Collateral ratio
The Multi-Collateral ratio is fixed, irrespective of the currency.
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.Background()
result, _, err := client.MultiCollateralLoanApi.GetMultiCollateralLtv(ctx)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]
[]CollateralFixRate GetMultiCollateralFixRate(ctx, )
Query fixed interest rates for the currency for 7 days and 30 days
package main
import (
"context"
"fmt"
"github.com/gateio/gateapi-go/v6"
)
func main() {
client := gateapi.NewAPIClient(gateapi.NewConfiguration())
// uncomment the next line if your are testing against testnet
// client.ChangeBasePath("https://fx-api-testnet.gateio.ws/api/v4")
ctx := context.Background()
result, _, err := client.MultiCollateralLoanApi.GetMultiCollateralFixRate(ctx)
if err != nil {
if e, ok := err.(gateapi.GateAPIError); ok {
fmt.Printf("gate api error: %s\n", e.Error())
} else {
fmt.Printf("generic error: %s\n", err.Error())
}
} else {
fmt.Println(result)
}
}
No authorization required
- Content-Type: Not defined
- Accept: application/json
[Back to top] [Back to API list] [Back to Model list] [Back to README]