From 8aec251a62bc78abc8312871e7de98b960704c65 Mon Sep 17 00:00:00 2001 From: c9s Date: Thu, 2 Jun 2022 01:41:41 +0800 Subject: [PATCH] max: fix v3 loan/repay api path --- pkg/exchange/max/maxapi/v3/margin.go | 4 ++-- pkg/exchange/max/maxapi/v3/margin_loan_request_requestgen.go | 4 ++-- pkg/exchange/max/maxapi/v3/margin_repay_request_requestgen.go | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/pkg/exchange/max/maxapi/v3/margin.go b/pkg/exchange/max/maxapi/v3/margin.go index 508df6801..64a891e74 100644 --- a/pkg/exchange/max/maxapi/v3/margin.go +++ b/pkg/exchange/max/maxapi/v3/margin.go @@ -149,14 +149,14 @@ type GetMarginLoanHistoryRequest struct { limit *int `param:"limit"` } -//go:generate PostRequest -url "/api/v3/wallet/m/loans/:currency" -type MarginLoanRequest -responseType .LoanRecord +//go:generate PostRequest -url "/api/v3/wallet/m/loan/:currency" -type MarginLoanRequest -responseType .LoanRecord type MarginLoanRequest struct { client requestgen.AuthenticatedAPIClient currency string `param:"currency,slug,required"` amount string `param:"amount"` } -//go:generate PostRequest -url "/api/v3/wallet/m/repayments/:currency" -type MarginRepayRequest -responseType .RepaymentRecord +//go:generate PostRequest -url "/api/v3/wallet/m/repayment/:currency" -type MarginRepayRequest -responseType .RepaymentRecord type MarginRepayRequest struct { client requestgen.AuthenticatedAPIClient currency string `param:"currency,slug,required"` diff --git a/pkg/exchange/max/maxapi/v3/margin_loan_request_requestgen.go b/pkg/exchange/max/maxapi/v3/margin_loan_request_requestgen.go index 39c69ff63..8f3e73466 100644 --- a/pkg/exchange/max/maxapi/v3/margin_loan_request_requestgen.go +++ b/pkg/exchange/max/maxapi/v3/margin_loan_request_requestgen.go @@ -1,4 +1,4 @@ -// Code generated by "requestgen -method POST -url /api/v3/wallet/m/loans/:currency -type MarginLoanRequest -responseType .LoanRecord"; DO NOT EDIT. +// Code generated by "requestgen -method POST -url /api/v3/wallet/m/loan/:currency -type MarginLoanRequest -responseType .LoanRecord"; DO NOT EDIT. package v3 @@ -143,7 +143,7 @@ func (m *MarginLoanRequest) Do(ctx context.Context) (*LoanRecord, error) { } query := url.Values{} - apiURL := "/api/v3/wallet/m/loans/:currency" + apiURL := "/api/v3/wallet/m/loan/:currency" slugs, err := m.GetSlugsMap() if err != nil { return nil, err diff --git a/pkg/exchange/max/maxapi/v3/margin_repay_request_requestgen.go b/pkg/exchange/max/maxapi/v3/margin_repay_request_requestgen.go index a221db7c0..a84beb475 100644 --- a/pkg/exchange/max/maxapi/v3/margin_repay_request_requestgen.go +++ b/pkg/exchange/max/maxapi/v3/margin_repay_request_requestgen.go @@ -1,4 +1,4 @@ -// Code generated by "requestgen -method POST -url /api/v3/wallet/m/repayments/:currency -type MarginRepayRequest -responseType .RepaymentRecord"; DO NOT EDIT. +// Code generated by "requestgen -method POST -url /api/v3/wallet/m/repayment/:currency -type MarginRepayRequest -responseType .RepaymentRecord"; DO NOT EDIT. package v3 @@ -143,7 +143,7 @@ func (m *MarginRepayRequest) Do(ctx context.Context) (*RepaymentRecord, error) { } query := url.Values{} - apiURL := "/api/v3/wallet/m/repayments/:currency" + apiURL := "/api/v3/wallet/m/repayment/:currency" slugs, err := m.GetSlugsMap() if err != nil { return nil, err