public class LoanAPIAdapter extends AuthRetrofitAPIImpl<LoanAPIRetrofit> implements LoanAPI
apiKey, apiKeyVersion, baseUrl, passPhrase, secret| 构造器和说明 |
|---|
LoanAPIAdapter(String baseUrl,
String apiKey,
String secret,
String passPhrase,
Integer apiKeyVersion) |
| 限定符和类型 | 方法和说明 |
|---|---|
BorrowResponse |
borrow(BorrowRequest request)
Post Borrow Order
|
Void |
cancelLendOrder(String orderId)
Cancel Lend Order
Request via this endpoint to cancel lend order.
|
LendResponse |
lend(LendRequest request)
Post Lend Order
Request via this endpoint to post lend order.
|
Pagination<ActiveLendItem> |
queryActiveLend(String currency,
Integer currentPage,
Integer pageSize)
Get Active Order
Request via this endpoint to get active lend orders.
|
BorrowQueryResponse |
queryBorrow(String orderId)
Get Borrow Order
Request via this endpoint to get the info of the borrow order through the orderId retrieved from Post Borrow Order .
|
Pagination<BorrowOutstandingResponse> |
queryBorrowOutstanding(BorrowRecordQueryRequest request)
Get Repay Record
|
Pagination<BorrowRepaidResponse> |
queryBorrowRepaid(BorrowRecordQueryRequest request)
Get Repayment Record
|
Pagination<DoneLendItem> |
queryDoneLend(String currency,
Integer currentPage,
Integer pageSize)
Get Lent History
Request via this endpoint to get lent orders .
|
List<LastTradeResponse> |
queryLastTrade(String currency)
Margin Trade Data
Request via this endpoint to get the last 300 fills in the lending and borrowing market.
|
List<LendAssetsResponse> |
queryLendAssets(String currency)
Get Account Lend Record
Request via this endpoint to get the lending history of the main account.
|
List<MarketItemResponse> |
queryMarket(String currency,
Integer term)
Lending Market Data
Request via this endpoint to get the configure info of the margin.
|
Pagination<SettledTradeItem> |
querySettledTrade(String currency,
Integer currentPage,
Integer pageSize)
Get Settled Lend Order History
Request via this endpoint to get the settled lend orders .
|
Pagination<UnsettledTradeItem> |
queryUnsettledTrade(String currency,
Integer currentPage,
Integer pageSize)
Get Active Lend Order List
Request via this endpoint to get the outstanding lend order list.
|
Void |
repayAll(RepayAllRequest request)
One-Click Repayment
|
Void |
repaySingle(RepaySingleRequest request)
Repay a Single Order
Request via this endpoint to repay a single order.
|
Void |
toggleAutoLend(ToggleAutoLendRequest request)
Set Auto-lend
Request via this endpoint to set up the automatic lending for a specified currency.
|
getAPIImplexecuteSync, getApiKey, getBaseUrl, getErrorResponse, getPassPhrase, getSecret, setApiKey, setBaseUrl, setPassPhrase, setSecretpublic BorrowResponse borrow(BorrowRequest request) throws IOException
LoanAPIborrow 在接口中 LoanAPIIOExceptionpublic BorrowQueryResponse queryBorrow(String orderId) throws IOException
LoanAPIRequest via this endpoint to get the info of the borrow order through the orderId retrieved from Post Borrow Order .
queryBorrow 在接口中 LoanAPIIOExceptionpublic Pagination<BorrowOutstandingResponse> queryBorrowOutstanding(BorrowRecordQueryRequest request) throws IOException
LoanAPIqueryBorrowOutstanding 在接口中 LoanAPIIOExceptionpublic Pagination<BorrowRepaidResponse> queryBorrowRepaid(BorrowRecordQueryRequest request) throws IOException
LoanAPIqueryBorrowRepaid 在接口中 LoanAPIIOExceptionpublic Void repayAll(RepayAllRequest request) throws IOException
LoanAPIrepayAll 在接口中 LoanAPIIOExceptionpublic Void repaySingle(RepaySingleRequest request) throws IOException
LoanAPIRequest via this endpoint to repay a single order.
repaySingle 在接口中 LoanAPIIOExceptionpublic LendResponse lend(LendRequest request) throws IOException
LoanAPIRequest via this endpoint to post lend order. Please ensure that you have sufficient funds in your Main Account before you post the order. Once the post succeed, the funds posted will be frozen until the order is succssfuly lent out or cancelled.
lend 在接口中 LoanAPIIOExceptionpublic Void cancelLendOrder(String orderId) throws IOException
LoanAPIRequest via this endpoint to cancel lend order.
cancelLendOrder 在接口中 LoanAPIIOExceptionpublic Void toggleAutoLend(ToggleAutoLendRequest request) throws IOException
LoanAPIRequest via this endpoint to set up the automatic lending for a specified currency.
toggleAutoLend 在接口中 LoanAPIIOExceptionpublic Pagination<ActiveLendItem> queryActiveLend(String currency, Integer currentPage, Integer pageSize) throws IOException
LoanAPIRequest via this endpoint to get active lend orders. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. The max pageSize is 100. Active lend orders include orders unfilled, partially filled and uncanceled.
queryActiveLend 在接口中 LoanAPIIOExceptionpublic Pagination<DoneLendItem> queryDoneLend(String currency, Integer currentPage, Integer pageSize) throws IOException
LoanAPIRequest via this endpoint to get lent orders . Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. The max pageSize is 100. Lent order history involves orders canceled or fully filled.
queryDoneLend 在接口中 LoanAPIIOExceptionpublic Pagination<UnsettledTradeItem> queryUnsettledTrade(String currency, Integer currentPage, Integer pageSize) throws IOException
LoanAPIRequest via this endpoint to get the outstanding lend order list. Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. The max pageSize is 100. When a lending order is executed, the system will generate the lending history. The outstanding lend orders includes orders unrepaid and partially repaid.
queryUnsettledTrade 在接口中 LoanAPIIOExceptionpublic Pagination<SettledTradeItem> querySettledTrade(String currency, Integer currentPage, Integer pageSize) throws IOException
LoanAPIRequest via this endpoint to get the settled lend orders . Items are paginated and sorted to show the latest first. See the Pagination section for retrieving additional entries after the first page. The max pageSize is 100. The settled lend orders include orders repaid fully or partially before or at the maturity time.
querySettledTrade 在接口中 LoanAPIIOExceptionpublic List<LendAssetsResponse> queryLendAssets(String currency) throws IOException
LoanAPIRequest via this endpoint to get the lending history of the main account.
queryLendAssets 在接口中 LoanAPIIOExceptionpublic List<MarketItemResponse> queryMarket(String currency, Integer term) throws IOException
LoanAPIRequest via this endpoint to get the configure info of the margin.
queryMarket 在接口中 LoanAPIIOExceptionpublic List<LastTradeResponse> queryLastTrade(String currency) throws IOException
LoanAPIRequest via this endpoint to get the last 300 fills in the lending and borrowing market. The returned value is sorted based on the descending sequence of the order execution time.
queryLastTrade 在接口中 LoanAPIIOExceptionCopyright © 2023. All rights reserved.