Merge pull request #429 from JJ-Cro/p2pupdate
feat(v4.1.0): Add full support for P2P trading, Add suffix to recent Earn types (minor breaking change)
This commit is contained in:
18
examples/apidoc/V5/P2P/get-account-information.js
Normal file
18
examples/apidoc/V5/P2P/get-account-information.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET',
|
||||
});
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.getP2PUserInfo()
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
23
examples/apidoc/V5/P2P/get-ad-detail.js
Normal file
23
examples/apidoc/V5/P2P/get-ad-detail.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET',
|
||||
});
|
||||
|
||||
// Example parameters
|
||||
const params = {
|
||||
itemId: '1898988222063644672', // Replace with your ad ID
|
||||
};
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.getP2PAdDetail(params)
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
29
examples/apidoc/V5/P2P/get-all-orders.js
Normal file
29
examples/apidoc/V5/P2P/get-all-orders.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET',
|
||||
});
|
||||
|
||||
// Example parameters
|
||||
const params = {
|
||||
status: null, // Optional: filter by order status
|
||||
beginTime: null, // Optional: filter by start time
|
||||
endTime: null, // Optional: filter by end time
|
||||
tokenId: null, // Optional: filter by token ID
|
||||
side: null, // Optional: filter by side (0: Buy, 1: Sell)
|
||||
page: 1, // Required: page number
|
||||
size: 1, // Required: rows per page
|
||||
};
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.getP2POrders(params)
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
25
examples/apidoc/V5/P2P/get-chat-message.js
Normal file
25
examples/apidoc/V5/P2P/get-chat-message.js
Normal file
@@ -0,0 +1,25 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET',
|
||||
});
|
||||
|
||||
// Example parameters
|
||||
const params = {
|
||||
orderId: '1898976123321221120', // Replace with your order ID
|
||||
size: '1', // Number of messages per page
|
||||
currentPage: '1', // Optional: current page number
|
||||
};
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.getP2POrderMessages(params)
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
21
examples/apidoc/V5/P2P/get-coin-balance.js
Normal file
21
examples/apidoc/V5/P2P/get-coin-balance.js
Normal file
@@ -0,0 +1,21 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Create a client
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'XXXXX',
|
||||
secret: 'XXXXX',
|
||||
});
|
||||
|
||||
// Get account coins balance
|
||||
client
|
||||
.getP2PAccountCoinsBalance({
|
||||
accountType: 'FUND',
|
||||
coin: 'USDC',
|
||||
})
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
24
examples/apidoc/V5/P2P/get-counterparty-user-info.js
Normal file
24
examples/apidoc/V5/P2P/get-counterparty-user-info.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET',
|
||||
});
|
||||
|
||||
// Example parameters
|
||||
const params = {
|
||||
originalUid: '290118', // Replace with the counterparty user ID
|
||||
orderId: '1900004704665923584', // Replace with your order ID
|
||||
};
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.getP2PCounterpartyUserInfo(params)
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
22
examples/apidoc/V5/P2P/get-market-online-ads-list.js
Normal file
22
examples/apidoc/V5/P2P/get-market-online-ads-list.js
Normal file
@@ -0,0 +1,22 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Create a client
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'XXXXX',
|
||||
secret: 'XXXXX',
|
||||
});
|
||||
|
||||
// Get market online ads list
|
||||
client
|
||||
.getP2POnlineAds({
|
||||
tokenId: 'USDT',
|
||||
currencyId: 'USD',
|
||||
side: '0', // 0: buy; 1: sell
|
||||
})
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
28
examples/apidoc/V5/P2P/get-my-ads-list.js
Normal file
28
examples/apidoc/V5/P2P/get-my-ads-list.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET'
|
||||
});
|
||||
|
||||
// Example parameters for getting personal P2P ads
|
||||
const params = {
|
||||
itemId: '123456789', // Optional: Specific advertisement ID
|
||||
status: 1, // Optional: Advertisement status (1: active, 2: completed, 3: cancelled)
|
||||
side: 1, // Optional: 0: buy; 1: sell
|
||||
tokenId: 'USDT', // Optional: Token ID
|
||||
page: 1, // Optional: Page number
|
||||
size: 20, // Optional: Page size
|
||||
currencyId: 'USD' // Optional: Currency ID
|
||||
};
|
||||
|
||||
// Get personal P2P ads
|
||||
client.getP2PPersonalAds(params)
|
||||
.then(response => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch(error => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
23
examples/apidoc/V5/P2P/get-order-detail.js
Normal file
23
examples/apidoc/V5/P2P/get-order-detail.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET',
|
||||
});
|
||||
|
||||
// Example parameters
|
||||
const params = {
|
||||
orderId: '1900004704665923584', // Replace with your order ID
|
||||
};
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.getP2POrderDetail(params)
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
29
examples/apidoc/V5/P2P/get-pending-orders.js
Normal file
29
examples/apidoc/V5/P2P/get-pending-orders.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET',
|
||||
});
|
||||
|
||||
// Example parameters
|
||||
const params = {
|
||||
status: 10, // waiting for buy pay
|
||||
beginTime: '1741831397000', // Optional: filter by start time
|
||||
endTime: '1741831424861', // Optional: filter by end time
|
||||
tokenId: 'USDT', // Optional: filter by token
|
||||
side: [0, 1], // Optional: filter by side (0: Buy, 1: Sell)
|
||||
page: 1,
|
||||
size: 3,
|
||||
};
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.getP2PPendingOrders(params)
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
18
examples/apidoc/V5/P2P/get-user-payment.js
Normal file
18
examples/apidoc/V5/P2P/get-user-payment.js
Normal file
@@ -0,0 +1,18 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET',
|
||||
});
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.getP2PUserPayments()
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
25
examples/apidoc/V5/P2P/mark-order-as-paid.js
Normal file
25
examples/apidoc/V5/P2P/mark-order-as-paid.js
Normal file
@@ -0,0 +1,25 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET',
|
||||
});
|
||||
|
||||
// Example parameters
|
||||
const params = {
|
||||
orderId: '1899736339155943424', // Replace with your order ID
|
||||
paymentType: '14', // Payment method used
|
||||
paymentId: '7110', // Payment method ID used
|
||||
};
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.markP2POrderAsPaid(params)
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
47
examples/apidoc/V5/P2P/post-new-ad.js
Normal file
47
examples/apidoc/V5/P2P/post-new-ad.js
Normal file
@@ -0,0 +1,47 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Create a client
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'XXXXX',
|
||||
secret: 'XXXXX',
|
||||
});
|
||||
|
||||
// Create new P2P advertisement
|
||||
client
|
||||
.createP2PAd({
|
||||
tokenId: 'USDT',
|
||||
currencyId: 'EUR',
|
||||
side: '0',
|
||||
priceType: '0',
|
||||
premium: '',
|
||||
price: '0.92',
|
||||
minAmount: '20',
|
||||
maxAmount: '45000',
|
||||
paymentIds: ['7110'],
|
||||
remark: 'test',
|
||||
tradingPreferenceSet: {
|
||||
isKyc: 1,
|
||||
hasCompleteRateDay30: 1,
|
||||
completeRateDay30: '95',
|
||||
hasOrderFinishNumberDay30: 1,
|
||||
hasRegisterTime: 0,
|
||||
hasUnPostAd: 0,
|
||||
isEmail: 0,
|
||||
isMobile: 0,
|
||||
nationalLimit: '',
|
||||
orderFinishNumberDay30: 60,
|
||||
registerTimeThreshold: 0,
|
||||
verificationOrderLabels: [],
|
||||
verificationOrderSwitch: false,
|
||||
},
|
||||
quantity: '20000',
|
||||
paymentPeriod: '15',
|
||||
itemType: 'ORIGIN',
|
||||
})
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
23
examples/apidoc/V5/P2P/release-digital-asset.js
Normal file
23
examples/apidoc/V5/P2P/release-digital-asset.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET',
|
||||
});
|
||||
|
||||
// Example parameters
|
||||
const params = {
|
||||
orderId: '1899736339155943424', // Replace with your order ID
|
||||
};
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.releaseP2POrder(params)
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
20
examples/apidoc/V5/P2P/remove-my-ad.js
Normal file
20
examples/apidoc/V5/P2P/remove-my-ad.js
Normal file
@@ -0,0 +1,20 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Create a client
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'XXXXX',
|
||||
secret: 'XXXXX',
|
||||
});
|
||||
|
||||
// Cancel P2P advertisement
|
||||
client
|
||||
.cancelP2PAd({
|
||||
itemId: '1899667660027793408',
|
||||
})
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
28
examples/apidoc/V5/P2P/send-chat-message.js
Normal file
28
examples/apidoc/V5/P2P/send-chat-message.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET',
|
||||
});
|
||||
|
||||
// Example parameters
|
||||
const params = {
|
||||
message: 'hi, test',
|
||||
contentType: 'text',
|
||||
orderId: '1898976123321221120', // Replace with your order ID
|
||||
// Optional parameters:
|
||||
// msgUuid: 'your-message-uuid',
|
||||
// fileName: 'example.pdf'
|
||||
};
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.sendP2POrderMessage(params)
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
34
examples/apidoc/V5/P2P/update-relist-my-ad.js
Normal file
34
examples/apidoc/V5/P2P/update-relist-my-ad.js
Normal file
@@ -0,0 +1,34 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
|
||||
// Create a client
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'XXXXX',
|
||||
secret: 'XXXXX',
|
||||
});
|
||||
|
||||
// Update P2P advertisement
|
||||
client
|
||||
.updateP2PAd({
|
||||
id: '1898988222063644672',
|
||||
priceType: '0',
|
||||
premium: '',
|
||||
price: '0.914',
|
||||
minAmount: '25',
|
||||
maxAmount: '5000',
|
||||
remark: '',
|
||||
paymentIds: ['-1'],
|
||||
tradingPreferenceSet: {},
|
||||
actionType: 'ACTIVE',
|
||||
quantity: '1000',
|
||||
paymentPeriod: '15',
|
||||
itemType: 'ORIGIN',
|
||||
subsidyAd: false,
|
||||
securityRiskToken: '',
|
||||
})
|
||||
.then((response) => {
|
||||
console.log(response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error(error);
|
||||
});
|
||||
23
examples/apidoc/V5/P2P/upload-chat-file.js
Normal file
23
examples/apidoc/V5/P2P/upload-chat-file.js
Normal file
@@ -0,0 +1,23 @@
|
||||
const { RestClientV5 } = require('bybit-api');
|
||||
const fs = require('fs');
|
||||
|
||||
// Initialize the client with testnet mode
|
||||
const client = new RestClientV5({
|
||||
testnet: true,
|
||||
key: 'YOUR_API_KEY',
|
||||
secret: 'YOUR_API_SECRET',
|
||||
});
|
||||
|
||||
// Create form data
|
||||
const formData = new FormData();
|
||||
formData.append('upload_file', fs.createReadStream('path/to/your/file.jpg')); // Replace with your file path
|
||||
|
||||
// Call the function
|
||||
client
|
||||
.uploadP2PChatFile(formData)
|
||||
.then((response) => {
|
||||
console.log('Response:', response);
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error('Error:', error);
|
||||
});
|
||||
4
package-lock.json
generated
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "bybit-api",
|
||||
"version": "4.0.1",
|
||||
"version": "4.1.0",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "bybit-api",
|
||||
"version": "4.0.1",
|
||||
"version": "4.1.0",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"axios": "^1.7.9",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "bybit-api",
|
||||
"version": "4.0.1",
|
||||
"version": "4.1.0",
|
||||
"description": "Complete & robust Node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & strong end to end tests.",
|
||||
"main": "lib/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
|
||||
@@ -1,209 +1,226 @@
|
||||
/* eslint-disable max-len */
|
||||
/* eslint-disable @typescript-eslint/no-explicit-any */
|
||||
import {
|
||||
APIResponseV3,
|
||||
APIResponseV3WithTime,
|
||||
AccountBorrowCollateralLimitV5,
|
||||
AccountCoinBalanceV5,
|
||||
AccountInfoV5,
|
||||
AccountMarginModeV5,
|
||||
AccountOrderV5,
|
||||
AccountTypeV5,
|
||||
AddOrReduceMarginParamsV5,
|
||||
AddOrReduceMarginResultV5,
|
||||
AffiliateUserInfoV5,
|
||||
AffiliateUserListItemV5,
|
||||
AllCoinsBalanceV5,
|
||||
AllowedDepositCoinInfoV5,
|
||||
AmendOrderParamsV5,
|
||||
ApiKeyInfoV5,
|
||||
AssetInfoV5,
|
||||
BatchAmendOrderParamsV5,
|
||||
BatchAmendOrderResultV5,
|
||||
BatchCancelOrderParamsV5,
|
||||
BatchCancelOrderResultV5,
|
||||
BatchCreateOrderResultV5,
|
||||
BatchOrderParamsV5,
|
||||
BatchOrdersResponseV5,
|
||||
BorrowCryptoLoanParamsV5,
|
||||
BorrowHistoryRecordV5,
|
||||
BrokerIssuedVoucherV5,
|
||||
BrokerVoucherSpecV5,
|
||||
CancelAllOrdersParamsV5,
|
||||
CancelOrderParamsV5,
|
||||
CategoryCursorListV5,
|
||||
CategoryListV5,
|
||||
CategorySymbolListV5,
|
||||
CategoryV5,
|
||||
ClosedPnLV5,
|
||||
CoinExchangeRecordV5,
|
||||
CoinGreeksV5,
|
||||
CoinInfoV5,
|
||||
CollateralInfoV5,
|
||||
CompletedLoanOrderV5,
|
||||
ConfirmNewRiskLimitParamsV5,
|
||||
ConvertCoinSpecV5,
|
||||
ConvertCoinsParamsV5,
|
||||
ConvertHistoryRecordV5,
|
||||
ConvertQuoteV5,
|
||||
ConvertStatusV5,
|
||||
CreateSubApiKeyParamsV5,
|
||||
CreateSubApiKeyResultV5,
|
||||
CreateSubMemberParamsV5,
|
||||
CreateSubMemberResultV5,
|
||||
CursorListV5,
|
||||
CursorRowsV5,
|
||||
DCPInfoV5,
|
||||
DeleteSubMemberParamsV5,
|
||||
DeliveryPriceV5,
|
||||
DeliveryRecordV5,
|
||||
DepositAddressChainV5,
|
||||
DepositRecordV5,
|
||||
ExchangeBrokerAccountInfoV5,
|
||||
ExchangeBrokerEarningResultV5,
|
||||
ExchangeBrokerSubAccountDepositRecordV5,
|
||||
ExecutionV5,
|
||||
FeeRateV5,
|
||||
FundingRateHistoryResponseV5,
|
||||
GetAccountCoinBalanceParamsV5,
|
||||
GetAccountHistoricOrdersParamsV5,
|
||||
GetAccountOrdersParamsV5,
|
||||
GetAllCoinsBalanceParamsV5,
|
||||
GetAllowedDepositCoinInfoParamsV5,
|
||||
GetAssetInfoParamsV5,
|
||||
GetBorrowHistoryParamsV5,
|
||||
GetBrokerIssuedVoucherParamsV5,
|
||||
GetBrokerSubAccountDepositsV5,
|
||||
GetClassicTransactionLogsParamsV5,
|
||||
GetClosedPnLParamsV5,
|
||||
GetCoinExchangeRecordParamsV5,
|
||||
GetCompletedLoanOrderHistoryParamsV5,
|
||||
GetConvertHistoryParamsV5,
|
||||
GetDeliveryPriceParamsV5,
|
||||
GetDeliveryRecordParamsV5,
|
||||
GetDepositRecordParamsV5,
|
||||
GetExchangeBrokerEarningsParamsV5,
|
||||
GetExecutionListParamsV5,
|
||||
GetFeeRateParamsV5,
|
||||
GetFundingRateHistoryParamsV5,
|
||||
GetHistoricalVolatilityParamsV5,
|
||||
GetIndexPriceKlineParamsV5,
|
||||
GetInstrumentsInfoParamsV5,
|
||||
GetInsuranceParamsV5,
|
||||
GetInternalDepositRecordParamsV5,
|
||||
GetInternalTransferParamsV5,
|
||||
GetKlineParamsV5,
|
||||
GetLoanLTVAdjustmentHistoryParamsV5,
|
||||
GetLongShortRatioParamsV5,
|
||||
GetMarkPriceKlineParamsV5,
|
||||
GetMovePositionHistoryParamsV5,
|
||||
GetOpenInterestParamsV5,
|
||||
GetOptionDeliveryPriceParamsV5,
|
||||
GetOrderbookParamsV5,
|
||||
GetPreUpgradeClosedPnlParamsV5,
|
||||
GetPreUpgradeOptionDeliveryRecordParamsV5,
|
||||
GetPreUpgradeOrderHistoryParamsV5,
|
||||
GetPreUpgradeTradeHistoryParamsV5,
|
||||
GetPreUpgradeTransactionLogParamsV5,
|
||||
GetPreUpgradeUSDCSessionParamsV5,
|
||||
GetPremiumIndexPriceKlineParamsV5,
|
||||
GetPublicTradingHistoryParamsV5,
|
||||
GetRepaymentHistoryParamsV5,
|
||||
GetRiskLimitParamsV5,
|
||||
GetSettlementRecordParamsV5,
|
||||
GetSpotLeveragedTokenOrderHistoryParamsV5,
|
||||
GetSubAccountAllApiKeysParamsV5,
|
||||
GetSubAccountDepositRecordParamsV5,
|
||||
GetTickersParamsV5,
|
||||
GetTransactionLogParamsV5,
|
||||
GetUniversalTransferRecordsParamsV5,
|
||||
GetUnpaidLoanOrdersParamsV5,
|
||||
GetVIPMarginDataParamsV5,
|
||||
GetWalletBalanceParamsV5,
|
||||
GetWithdrawalRecordsParamsV5,
|
||||
HistoricalVolatilityV5,
|
||||
InstrumentInfoResponseV5,
|
||||
InsuranceResponseV5,
|
||||
InternalDepositRecordV5,
|
||||
InternalTransferRecordV5,
|
||||
IssueVoucherParamsV5,
|
||||
LeverageTokenInfoV5,
|
||||
LeveragedTokenMarketResultV5,
|
||||
LoanLTVAdjustmentHistoryV5,
|
||||
LongShortRatioV5,
|
||||
MMPModifyParamsV5,
|
||||
MMPStateV5,
|
||||
MovePositionHistoryV5,
|
||||
MovePositionParamsV5,
|
||||
MovePositionResultV5,
|
||||
OHLCKlineV5,
|
||||
OHLCVKlineV5,
|
||||
OpenInterestResponseV5,
|
||||
OptionDeliveryPriceV5,
|
||||
OrderParamsV5,
|
||||
OrderResultV5,
|
||||
OrderSideV5,
|
||||
OrderbookResponseV5,
|
||||
PositionInfoParamsV5,
|
||||
PositionV5,
|
||||
PreUpgradeOptionsDelivery,
|
||||
PreUpgradeTransaction,
|
||||
PreUpgradeUSDCSessionSettlement,
|
||||
PublicTradeV5,
|
||||
PurchaseSpotLeveragedTokenParamsV5,
|
||||
PurchaseSpotLeveragedTokenResultV5,
|
||||
RedeemSpotLeveragedTokenParamsV5,
|
||||
RedeemSpotLeveragedTokenResultV5,
|
||||
RepayLiabilityParamsV5,
|
||||
RepayLiabilityResultV5,
|
||||
RepaymentHistoryV5,
|
||||
RequestConvertQuoteParamsV5,
|
||||
RiskLimitV5,
|
||||
SetAutoAddMarginParamsV5,
|
||||
SetCollateralCoinParamsV5,
|
||||
SetLeverageParamsV5,
|
||||
SetRiskLimitParamsV5,
|
||||
SetRiskLimitResultV5,
|
||||
SetTPSLModeParamsV5,
|
||||
SetTradingStopParamsV5,
|
||||
SettlementRecordV5,
|
||||
SpotBorrowCheckResultV5,
|
||||
SpotLeveragedTokenOrderHistoryV5,
|
||||
SpotMarginStateV5,
|
||||
SubMemberV5,
|
||||
SwitchIsolatedMarginParamsV5,
|
||||
SwitchPositionModeParamsV5,
|
||||
TPSLModeV5,
|
||||
TickerLinearInverseV5,
|
||||
TickerOptionV5,
|
||||
TickerSpotV5,
|
||||
TransactionLogV5,
|
||||
UnifiedAccountUpgradeResultV5,
|
||||
UniversalTransferParamsV5,
|
||||
UniversalTransferRecordV5,
|
||||
UnpaidLoanOrderV5,
|
||||
UpdateApiKeyParamsV5,
|
||||
UpdateApiKeyResultV5,
|
||||
VIPMarginDataV5,
|
||||
VaspEntityV5,
|
||||
VipBorrowableCoinsV5,
|
||||
VipCollateralCoinsV5,
|
||||
WalletBalanceV5,
|
||||
WithdrawParamsV5,
|
||||
WithdrawableAmountV5,
|
||||
WithdrawalRecordV5,
|
||||
APIResponseV3,
|
||||
APIResponseV3WithTime,
|
||||
AccountBorrowCollateralLimitV5,
|
||||
AccountCoinBalanceV5,
|
||||
AccountInfoV5,
|
||||
AccountMarginModeV5,
|
||||
AccountOrderV5,
|
||||
AccountTypeV5,
|
||||
AddOrReduceMarginParamsV5,
|
||||
AddOrReduceMarginResultV5,
|
||||
AffiliateUserInfoV5,
|
||||
AffiliateUserListItemV5,
|
||||
AllCoinsBalanceV5,
|
||||
AllowedDepositCoinInfoV5,
|
||||
AmendOrderParamsV5,
|
||||
ApiKeyInfoV5,
|
||||
AssetInfoV5,
|
||||
BatchAmendOrderParamsV5,
|
||||
BatchAmendOrderResultV5,
|
||||
BatchCancelOrderParamsV5,
|
||||
BatchCancelOrderResultV5,
|
||||
BatchCreateOrderResultV5,
|
||||
BatchOrderParamsV5,
|
||||
BatchOrdersResponseV5,
|
||||
BorrowCryptoLoanParamsV5,
|
||||
BorrowHistoryRecordV5,
|
||||
BrokerIssuedVoucherV5,
|
||||
BrokerVoucherSpecV5,
|
||||
CancelAllOrdersParamsV5,
|
||||
CancelOrderParamsV5,
|
||||
CategoryCursorListV5,
|
||||
CategoryListV5,
|
||||
CategorySymbolListV5,
|
||||
CategoryV5,
|
||||
ClosedPnLV5,
|
||||
CoinExchangeRecordV5,
|
||||
CoinGreeksV5,
|
||||
CoinInfoV5,
|
||||
CollateralInfoV5,
|
||||
CompletedLoanOrderV5,
|
||||
ConfirmNewRiskLimitParamsV5,
|
||||
ConvertCoinSpecV5,
|
||||
ConvertCoinsParamsV5,
|
||||
ConvertHistoryRecordV5,
|
||||
ConvertQuoteV5,
|
||||
ConvertStatusV5,
|
||||
CreateP2PAdParamsV5,
|
||||
CreateSubApiKeyParamsV5,
|
||||
CreateSubApiKeyResultV5,
|
||||
CreateSubMemberParamsV5,
|
||||
CreateSubMemberResultV5,
|
||||
CursorListV5,
|
||||
CursorRowsV5,
|
||||
DCPInfoV5,
|
||||
DeleteSubMemberParamsV5,
|
||||
DeliveryPriceV5,
|
||||
DeliveryRecordV5,
|
||||
DepositAddressChainV5,
|
||||
DepositRecordV5,
|
||||
EarnOrderHistoryV5,
|
||||
EarnPositionV5,
|
||||
EarnProductV5,
|
||||
ExchangeBrokerAccountInfoV5,
|
||||
ExchangeBrokerEarningResultV5,
|
||||
ExchangeBrokerSubAccountDepositRecordV5,
|
||||
ExecutionV5,
|
||||
FeeRateV5,
|
||||
FundingRateHistoryResponseV5,
|
||||
GetAccountCoinBalanceParamsV5,
|
||||
GetAccountHistoricOrdersParamsV5,
|
||||
GetAccountOrdersParamsV5,
|
||||
GetAllCoinsBalanceParamsV5,
|
||||
GetAllowedDepositCoinInfoParamsV5,
|
||||
GetAssetInfoParamsV5,
|
||||
GetBorrowHistoryParamsV5,
|
||||
GetBrokerIssuedVoucherParamsV5,
|
||||
GetBrokerSubAccountDepositsV5,
|
||||
GetClassicTransactionLogsParamsV5,
|
||||
GetClosedPnLParamsV5,
|
||||
GetCoinExchangeRecordParamsV5,
|
||||
GetCompletedLoanOrderHistoryParamsV5,
|
||||
GetConvertHistoryParamsV5,
|
||||
GetDeliveryPriceParamsV5,
|
||||
GetDeliveryRecordParamsV5,
|
||||
GetDepositRecordParamsV5,
|
||||
GetEarnOrderHistoryParamsV5,
|
||||
GetEarnPositionParamsV5,
|
||||
GetExchangeBrokerEarningsParamsV5,
|
||||
GetExecutionListParamsV5,
|
||||
GetFeeRateParamsV5,
|
||||
GetFundingRateHistoryParamsV5,
|
||||
GetHistoricalVolatilityParamsV5,
|
||||
GetIndexPriceKlineParamsV5,
|
||||
GetInstrumentsInfoParamsV5,
|
||||
GetInsuranceParamsV5,
|
||||
GetInternalDepositRecordParamsV5,
|
||||
GetInternalTransferParamsV5,
|
||||
GetKlineParamsV5,
|
||||
GetLoanLTVAdjustmentHistoryParamsV5,
|
||||
GetLongShortRatioParamsV5,
|
||||
GetMarkPriceKlineParamsV5,
|
||||
GetMovePositionHistoryParamsV5,
|
||||
GetOpenInterestParamsV5,
|
||||
GetOptionDeliveryPriceParamsV5,
|
||||
GetOrderbookParamsV5,
|
||||
GetP2PAccountCoinsBalanceParamsV5,
|
||||
GetP2PCounterpartyUserInfoParamsV5,
|
||||
GetP2POnlineAdsParamsV5,
|
||||
GetP2POrderMessagesParamsV5,
|
||||
GetP2POrdersParamsV5,
|
||||
GetP2PPendingOrdersParamsV5,
|
||||
GetP2PPersonalAdsParamsV5,
|
||||
GetPreUpgradeClosedPnlParamsV5,
|
||||
GetPreUpgradeOptionDeliveryRecordParamsV5,
|
||||
GetPreUpgradeOrderHistoryParamsV5,
|
||||
GetPreUpgradeTradeHistoryParamsV5,
|
||||
GetPreUpgradeTransactionLogParamsV5,
|
||||
GetPreUpgradeUSDCSessionParamsV5,
|
||||
GetPremiumIndexPriceKlineParamsV5,
|
||||
GetPublicTradingHistoryParamsV5,
|
||||
GetRepaymentHistoryParamsV5,
|
||||
GetRiskLimitParamsV5,
|
||||
GetSettlementRecordParamsV5,
|
||||
GetSpotLeveragedTokenOrderHistoryParamsV5,
|
||||
GetSubAccountAllApiKeysParamsV5,
|
||||
GetSubAccountDepositRecordParamsV5,
|
||||
GetTickersParamsV5,
|
||||
GetTransactionLogParamsV5,
|
||||
GetUniversalTransferRecordsParamsV5,
|
||||
GetUnpaidLoanOrdersParamsV5,
|
||||
GetVIPMarginDataParamsV5,
|
||||
GetWalletBalanceParamsV5,
|
||||
GetWithdrawalRecordsParamsV5,
|
||||
HistoricalVolatilityV5,
|
||||
InstrumentInfoResponseV5,
|
||||
InsuranceResponseV5,
|
||||
InternalDepositRecordV5,
|
||||
InternalTransferRecordV5,
|
||||
IssueVoucherParamsV5,
|
||||
LeverageTokenInfoV5,
|
||||
LeveragedTokenMarketResultV5,
|
||||
LoanLTVAdjustmentHistoryV5,
|
||||
LongShortRatioV5,
|
||||
MMPModifyParamsV5,
|
||||
MMPStateV5,
|
||||
MarkP2POrderAsPaidParamsV5,
|
||||
MovePositionHistoryV5,
|
||||
MovePositionParamsV5,
|
||||
MovePositionResultV5,
|
||||
OHLCKlineV5,
|
||||
OHLCVKlineV5,
|
||||
OpenInterestResponseV5,
|
||||
OptionDeliveryPriceV5,
|
||||
OrderParamsV5,
|
||||
OrderResultV5,
|
||||
OrderSideV5,
|
||||
OrderbookResponseV5,
|
||||
P2PAccountCoinsBalanceV5,
|
||||
P2PAdDetailV5,
|
||||
P2PCounterpartyUserInfoV5,
|
||||
P2PCreateAdResponseV5,
|
||||
P2POnlineAdsResponseV5,
|
||||
P2POrderDetailV5,
|
||||
P2POrderMessageV5,
|
||||
P2POrdersResponseV5,
|
||||
P2PPersonalAdsResponseV5,
|
||||
P2PUserInfoV5,
|
||||
P2PUserPaymentV5,
|
||||
PositionInfoParamsV5,
|
||||
PositionV5,
|
||||
PreUpgradeOptionsDelivery,
|
||||
PreUpgradeTransaction,
|
||||
PreUpgradeUSDCSessionSettlement,
|
||||
PublicTradeV5,
|
||||
PurchaseSpotLeveragedTokenParamsV5,
|
||||
PurchaseSpotLeveragedTokenResultV5,
|
||||
RedeemSpotLeveragedTokenParamsV5,
|
||||
RedeemSpotLeveragedTokenResultV5,
|
||||
RepayLiabilityParamsV5,
|
||||
RepayLiabilityResultV5,
|
||||
RepaymentHistoryV5,
|
||||
RequestConvertQuoteParamsV5,
|
||||
RiskLimitV5,
|
||||
SendP2POrderMessageParamsV5,
|
||||
SetAutoAddMarginParamsV5,
|
||||
SetCollateralCoinParamsV5,
|
||||
SetLeverageParamsV5,
|
||||
SetRiskLimitParamsV5,
|
||||
SetRiskLimitResultV5,
|
||||
SetTPSLModeParamsV5,
|
||||
SetTradingStopParamsV5,
|
||||
SettlementRecordV5,
|
||||
SpotBorrowCheckResultV5,
|
||||
SpotLeveragedTokenOrderHistoryV5,
|
||||
SpotMarginStateV5,
|
||||
SubMemberV5,
|
||||
SubmitStakeRedeemParamsV5,
|
||||
SwitchIsolatedMarginParamsV5,
|
||||
SwitchPositionModeParamsV5,
|
||||
TPSLModeV5,
|
||||
TickerLinearInverseV5,
|
||||
TickerOptionV5,
|
||||
TickerSpotV5,
|
||||
TransactionLogV5,
|
||||
UnifiedAccountUpgradeResultV5,
|
||||
UniversalTransferParamsV5,
|
||||
UniversalTransferRecordV5,
|
||||
UnpaidLoanOrderV5,
|
||||
UpdateApiKeyParamsV5,
|
||||
UpdateApiKeyResultV5,
|
||||
UpdateP2PAdParamsV5,
|
||||
VIPMarginDataV5,
|
||||
VaspEntityV5,
|
||||
VipBorrowableCoinsV5,
|
||||
VipCollateralCoinsV5,
|
||||
WalletBalanceV5,
|
||||
WithdrawParamsV5,
|
||||
WithdrawableAmountV5,
|
||||
WithdrawalRecordV5,
|
||||
} from './types';
|
||||
import {
|
||||
GetEarnOrderHistoryParams,
|
||||
GetEarnPositionParams,
|
||||
SubmitStakeRedeemParams,
|
||||
} from './types/request/v5-earn';
|
||||
import {
|
||||
EarnOrderHistory,
|
||||
EarnPosition,
|
||||
EarnProduct,
|
||||
} from './types/response/v5-earn';
|
||||
|
||||
import { REST_CLIENT_TYPE_ENUM } from './util';
|
||||
import BaseRestClient from './util/BaseRestClient';
|
||||
|
||||
@@ -2570,7 +2587,7 @@ export class RestClientV5 extends BaseRestClient {
|
||||
*/
|
||||
getEarnProduct(params: { category: string; coin?: string }): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
list: EarnProduct[];
|
||||
list: EarnProductV5[];
|
||||
}>
|
||||
> {
|
||||
return this.get('/v5/earn/product', params);
|
||||
@@ -2586,7 +2603,7 @@ export class RestClientV5 extends BaseRestClient {
|
||||
* within 48 hours. Once the redemption request is initiated, it cannot be canceled,
|
||||
* and your principal will continue to earn interest until the process is completed.
|
||||
*/
|
||||
submitStakeRedeem(params: SubmitStakeRedeemParams): Promise<
|
||||
submitStakeRedeem(params: SubmitStakeRedeemParamsV5): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
orderId: string;
|
||||
orderLinkId: string;
|
||||
@@ -2603,9 +2620,9 @@ export class RestClientV5 extends BaseRestClient {
|
||||
* Note: Either orderId or orderLinkId is required. If both are passed,
|
||||
* make sure they're matched, otherwise returning empty result
|
||||
*/
|
||||
getEarnOrderHistory(params: GetEarnOrderHistoryParams): Promise<
|
||||
getEarnOrderHistory(params: GetEarnOrderHistoryParamsV5): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
list: EarnOrderHistory[];
|
||||
list: EarnOrderHistoryV5[];
|
||||
}>
|
||||
> {
|
||||
return this.getPrivate('/v5/earn/order', params);
|
||||
@@ -2618,11 +2635,208 @@ export class RestClientV5 extends BaseRestClient {
|
||||
*
|
||||
* Note: Fully redeemed position is also returned in the response
|
||||
*/
|
||||
getEarnPosition(params: GetEarnPositionParams): Promise<
|
||||
getEarnPosition(params: GetEarnPositionParamsV5): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
list: EarnPosition[];
|
||||
list: EarnPositionV5[];
|
||||
}>
|
||||
> {
|
||||
return this.getPrivate('/v5/earn/position', params);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
****** P2P TRADING
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* General P2P
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get coin balance of all account types under the master account, and sub account.
|
||||
*
|
||||
* Note: this field is mandatory for accountType=UNIFIED, and supports up to 10 coins each request
|
||||
*/
|
||||
getP2PAccountCoinsBalance(
|
||||
params: GetP2PAccountCoinsBalanceParamsV5,
|
||||
): Promise<APIResponseV3WithTime<P2PAccountCoinsBalanceV5>> {
|
||||
return this.getPrivate(
|
||||
'/v5/asset/transfer/query-account-coins-balance',
|
||||
params,
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Advertisement P2P
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get market online ads list
|
||||
*/
|
||||
getP2POnlineAds(
|
||||
params: GetP2POnlineAdsParamsV5,
|
||||
): Promise<APIResponseV3WithTime<P2POnlineAdsResponseV5>> {
|
||||
return this.post('/v5/p2p/item/online', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Post new P2P advertisement
|
||||
*/
|
||||
createP2PAd(
|
||||
params: CreateP2PAdParamsV5,
|
||||
): Promise<APIResponseV3WithTime<P2PCreateAdResponseV5>> {
|
||||
return this.postPrivate('/v5/p2p/item/create', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Cancel P2P advertisement
|
||||
*/
|
||||
cancelP2PAd(params: { itemId: string }): Promise<
|
||||
APIResponseV3WithTime<{
|
||||
securityRiskToken: string;
|
||||
riskTokenType: string;
|
||||
riskVersion: string;
|
||||
needSecurityRisk: boolean;
|
||||
}>
|
||||
> {
|
||||
return this.postPrivate('/v5/p2p/item/cancel', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Update or relist P2P advertisement
|
||||
*/
|
||||
updateP2PAd(
|
||||
params: UpdateP2PAdParamsV5,
|
||||
): Promise<APIResponseV3WithTime<P2PCreateAdResponseV5>> {
|
||||
return this.postPrivate('/v5/p2p/item/update', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get personal P2P ads list
|
||||
*
|
||||
*/
|
||||
getP2PPersonalAds(
|
||||
params: GetP2PPersonalAdsParamsV5,
|
||||
): Promise<APIResponseV3WithTime<P2PPersonalAdsResponseV5>> {
|
||||
return this.postPrivate('/v5/p2p/item/personal/list', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get P2P ad details
|
||||
*/
|
||||
getP2PAdDetail(params: {
|
||||
itemId: string;
|
||||
}): Promise<APIResponseV3WithTime<P2PAdDetailV5>> {
|
||||
return this.postPrivate('/v5/p2p/item/info', params);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Orders P2P
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get all P2P orders
|
||||
*
|
||||
*/
|
||||
getP2POrders(
|
||||
params: GetP2POrdersParamsV5,
|
||||
): Promise<APIResponseV3WithTime<P2POrdersResponseV5>> {
|
||||
return this.postPrivate('/v5/p2p/order/simplifyList', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get P2P order details
|
||||
*
|
||||
*/
|
||||
getP2POrderDetail(params: {
|
||||
orderId: string;
|
||||
}): Promise<APIResponseV3WithTime<P2POrderDetailV5>> {
|
||||
return this.postPrivate('/v5/p2p/order/info', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get pending P2P orders
|
||||
*/
|
||||
getP2PPendingOrders(
|
||||
params: GetP2PPendingOrdersParamsV5,
|
||||
): Promise<APIResponseV3WithTime<P2POrdersResponseV5>> {
|
||||
return this.postPrivate('/v5/p2p/order/pending/simplifyList', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Mark P2P order as paid
|
||||
*/
|
||||
markP2POrderAsPaid(
|
||||
params: MarkP2POrderAsPaidParamsV5,
|
||||
): Promise<APIResponseV3WithTime<null>> {
|
||||
return this.postPrivate('/v5/p2p/order/pay', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Release digital assets in a P2P order
|
||||
*/
|
||||
releaseP2POrder(params: {
|
||||
orderId: string;
|
||||
}): Promise<APIResponseV3WithTime<null>> {
|
||||
return this.postPrivate('/v5/p2p/order/finish', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Send chat message in a P2P order
|
||||
*/
|
||||
sendP2POrderMessage(
|
||||
params: SendP2POrderMessageParamsV5,
|
||||
): Promise<APIResponseV3WithTime<null>> {
|
||||
return this.postPrivate('/v5/p2p/order/message/send', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Upload chat file for P2P order
|
||||
*/
|
||||
uploadP2PChatFile(params: {
|
||||
upload_file: File; // Only supports: jpg, png, jpeg, pdf, mp4
|
||||
}): Promise<APIResponseV3WithTime<null>> {
|
||||
return this.postPrivate('/v5/p2p/oss/upload_file', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get chat messages in a P2P order
|
||||
*/
|
||||
getP2POrderMessages(
|
||||
params: GetP2POrderMessagesParamsV5,
|
||||
): Promise<APIResponseV3WithTime<P2POrderMessageV5[]>> {
|
||||
return this.postPrivate('/v5/p2p/order/message/listpage', params);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* User P2P
|
||||
*/
|
||||
|
||||
/**
|
||||
* Get P2P user account information
|
||||
*/
|
||||
getP2PUserInfo(): Promise<APIResponseV3WithTime<P2PUserInfoV5>> {
|
||||
return this.postPrivate('/v5/p2p/user/personal/info');
|
||||
}
|
||||
|
||||
/**
|
||||
* Get counterparty user information in a P2P order
|
||||
*/
|
||||
getP2PCounterpartyUserInfo(
|
||||
params: GetP2PCounterpartyUserInfoParamsV5,
|
||||
): Promise<APIResponseV3WithTime<P2PCounterpartyUserInfoV5>> {
|
||||
return this.postPrivate('/v5/p2p/user/order/personal/info', params);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get user payment information
|
||||
*/
|
||||
getP2PUserPayments(): Promise<APIResponseV3WithTime<P2PUserPaymentV5[]>> {
|
||||
return this.postPrivate('/v5/p2p/user/payment/list');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,19 +1,21 @@
|
||||
export * from './account-asset';
|
||||
export * from './copy-trading';
|
||||
export * from './contract';
|
||||
export * from './linear';
|
||||
export * from './copy-trading';
|
||||
export * from './inverse';
|
||||
export * from './usdc-perp';
|
||||
export * from './usdc-options';
|
||||
export * from './usdc-shared';
|
||||
export * from './linear';
|
||||
export * from './unified-margin';
|
||||
export * from './usdc-options';
|
||||
export * from './usdc-perp';
|
||||
export * from './usdc-shared';
|
||||
export * from './v5-account';
|
||||
export * from './v5-asset';
|
||||
export * from './v5-market';
|
||||
export * from './v5-position';
|
||||
export * from './v5-pre-upgrade';
|
||||
export * from './v5-trade';
|
||||
export * from './v5-user';
|
||||
export * from './v5-spot-leverage-token';
|
||||
export * from './v5-broker';
|
||||
export * from './v5-crypto-loan';
|
||||
export * from './v5-earn';
|
||||
export * from './v5-market';
|
||||
export * from './v5-p2p-trading';
|
||||
export * from './v5-position';
|
||||
export * from './v5-pre-upgrade';
|
||||
export * from './v5-spot-leverage-token';
|
||||
export * from './v5-trade';
|
||||
export * from './v5-user';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export interface SubmitStakeRedeemParams {
|
||||
export interface SubmitStakeRedeemParamsV5 {
|
||||
category: string;
|
||||
orderType: 'Stake' | 'Redeem';
|
||||
accountType: 'FUND' | 'UNIFIED';
|
||||
@@ -8,13 +8,13 @@ export interface SubmitStakeRedeemParams {
|
||||
orderLinkId: string;
|
||||
}
|
||||
|
||||
export interface GetEarnOrderHistoryParams {
|
||||
export interface GetEarnOrderHistoryParamsV5 {
|
||||
category: string;
|
||||
orderId?: string;
|
||||
orderLinkId?: string;
|
||||
}
|
||||
|
||||
export interface GetEarnPositionParams {
|
||||
export interface GetEarnPositionParamsV5 {
|
||||
category: string;
|
||||
productId?: string;
|
||||
coin?: string;
|
||||
|
||||
119
src/types/request/v5-p2p-trading.ts
Normal file
119
src/types/request/v5-p2p-trading.ts
Normal file
@@ -0,0 +1,119 @@
|
||||
export interface GetP2PAccountCoinsBalanceParamsV5 {
|
||||
memberId?: string;
|
||||
accountType: string;
|
||||
coin?: string;
|
||||
withBonus?: 0 | 1;
|
||||
}
|
||||
|
||||
export interface GetP2POnlineAdsParamsV5 {
|
||||
tokenId: string;
|
||||
currencyId: string;
|
||||
side: '0' | '1'; // 0: buy; 1: sell
|
||||
page?: string;
|
||||
size?: string;
|
||||
}
|
||||
|
||||
export interface P2PTradingPreferenceSetV5 {
|
||||
hasUnPostAd?: 0 | 1;
|
||||
isKyc?: 0 | 1;
|
||||
isEmail?: 0 | 1;
|
||||
isMobile?: 0 | 1;
|
||||
hasRegisterTime?: 0 | 1;
|
||||
registerTimeThreshold?: number;
|
||||
orderFinishNumberDay30?: number;
|
||||
completeRateDay30?: string;
|
||||
nationalLimit?: string;
|
||||
hasOrderFinishNumberDay30?: 0 | 1;
|
||||
hasCompleteRateDay30?: 0 | 1;
|
||||
hasNationalLimit?: 0 | 1;
|
||||
}
|
||||
|
||||
export interface CreateP2PAdParamsV5 {
|
||||
tokenId: string;
|
||||
currencyId: string;
|
||||
side: '0' | '1'; // 0: buy; 1: sell
|
||||
priceType: '0' | '1'; // 0: fixed rate; 1: floating rate
|
||||
premium: string;
|
||||
price: string;
|
||||
minAmount: string;
|
||||
maxAmount: string;
|
||||
remark: string;
|
||||
tradingPreferenceSet: P2PTradingPreferenceSetV5;
|
||||
paymentIds: string[];
|
||||
quantity: string;
|
||||
paymentPeriod: string;
|
||||
itemType: 'ORIGIN' | 'BULK';
|
||||
}
|
||||
|
||||
export interface UpdateP2PAdParamsV5 {
|
||||
id: string;
|
||||
priceType: '0' | '1'; // 0: fixed rate; 1: floating rate
|
||||
premium: string;
|
||||
price: string;
|
||||
minAmount: string;
|
||||
maxAmount: string;
|
||||
remark: string;
|
||||
tradingPreferenceSet: P2PTradingPreferenceSetV5;
|
||||
paymentIds: string[];
|
||||
actionType: 'MODIFY' | 'ACTIVE'; // MODIFY: modify adv; ACTIVE: reonline adv
|
||||
quantity: string;
|
||||
paymentPeriod: string;
|
||||
itemType?: 'ORIGIN' | 'BULK';
|
||||
subsidyAd?: boolean;
|
||||
securityRiskToken?: string;
|
||||
}
|
||||
|
||||
export interface GetP2PPersonalAdsParamsV5 {
|
||||
itemId?: string;
|
||||
status?: '1' | '2'; // 1: Sold Out; 2: Available
|
||||
side?: '0' | '1'; // 0: buy; 1: sell
|
||||
tokenId?: string;
|
||||
page?: string;
|
||||
size?: string;
|
||||
currencyId?: string;
|
||||
}
|
||||
|
||||
export interface GetP2POrdersParamsV5 {
|
||||
status?: number;
|
||||
beginTime?: string;
|
||||
endTime?: string;
|
||||
tokenId?: string;
|
||||
side?: number[];
|
||||
page: number;
|
||||
size: number;
|
||||
}
|
||||
|
||||
export interface GetP2PPendingOrdersParamsV5 {
|
||||
status?: number;
|
||||
beginTime?: string;
|
||||
endTime?: string;
|
||||
tokenId?: string;
|
||||
side?: number[];
|
||||
page: number;
|
||||
size: number;
|
||||
}
|
||||
|
||||
export interface MarkP2POrderAsPaidParamsV5 {
|
||||
orderId: string;
|
||||
paymentType: string;
|
||||
paymentId: string;
|
||||
}
|
||||
|
||||
export interface SendP2POrderMessageParamsV5 {
|
||||
message: string;
|
||||
contentType: string;
|
||||
orderId: string;
|
||||
msgUuid?: string;
|
||||
fileName?: string;
|
||||
}
|
||||
|
||||
export interface GetP2POrderMessagesParamsV5 {
|
||||
orderId: string;
|
||||
currentPage?: string;
|
||||
size: string;
|
||||
}
|
||||
|
||||
export interface GetP2PCounterpartyUserInfoParamsV5 {
|
||||
originalUid: string;
|
||||
orderId: string;
|
||||
}
|
||||
@@ -2,15 +2,17 @@ export * from './account-asset';
|
||||
export * from './contract';
|
||||
export * from './shared';
|
||||
export * from './spot';
|
||||
export * from './usdt-perp';
|
||||
export * from './unified-margin';
|
||||
export * from './usdt-perp';
|
||||
export * from './v5-account';
|
||||
export * from './v5-asset';
|
||||
export * from './v5-broker';
|
||||
export * from './v5-crypto-loan';
|
||||
export * from './v5-market';
|
||||
export * from './v5-p2p-trading';
|
||||
export * from './v5-position';
|
||||
export * from './v5-preupgrade';
|
||||
export * from './v5-spot-leverage-token';
|
||||
export * from './v5-trade';
|
||||
export * from './v5-user';
|
||||
export * from './v5-spot-leverage-token';
|
||||
export * from './v5-broker';
|
||||
export * from './v5-preupgrade';
|
||||
export * from './v5-crypto-loan';
|
||||
export * from './v5-earn';
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
export interface EarnProduct {
|
||||
export interface EarnProductV5 {
|
||||
category: string;
|
||||
estimateApr: string;
|
||||
coin: string;
|
||||
@@ -9,7 +9,7 @@ export interface EarnProduct {
|
||||
status: 'Available' | 'NotAvailable';
|
||||
}
|
||||
|
||||
export interface EarnOrderHistory {
|
||||
export interface EarnOrderHistoryV5 {
|
||||
coin: string;
|
||||
orderValue: string;
|
||||
orderType: 'Redeem' | 'Stake';
|
||||
@@ -21,7 +21,7 @@ export interface EarnOrderHistory {
|
||||
updatedAt: string;
|
||||
}
|
||||
|
||||
export interface EarnPosition {
|
||||
export interface EarnPositionV5 {
|
||||
coin: string;
|
||||
productId: string;
|
||||
amount: string;
|
||||
|
||||
603
src/types/response/v5-p2p-trading.ts
Normal file
603
src/types/response/v5-p2p-trading.ts
Normal file
@@ -0,0 +1,603 @@
|
||||
import { P2PTradingPreferenceSetV5 } from '../request/v5-p2p-trading';
|
||||
|
||||
export interface P2PCoinBalanceV5 {
|
||||
coin: string;
|
||||
transferBalance: string;
|
||||
walletBalance: string;
|
||||
bonus: string;
|
||||
}
|
||||
|
||||
export interface P2PAccountCoinsBalanceV5 {
|
||||
memberId: string;
|
||||
accountType: string;
|
||||
balance: P2PCoinBalanceV5[];
|
||||
}
|
||||
|
||||
export interface P2POnlineAdV5 {
|
||||
id: string;
|
||||
nickName: string;
|
||||
tokenId: string;
|
||||
currencyId: string;
|
||||
side: string;
|
||||
price: string;
|
||||
lastQuantity: string;
|
||||
minAmount: string;
|
||||
maxAmount: string;
|
||||
payments: string[];
|
||||
recentOrderNum: number;
|
||||
recentExecuteRate: number;
|
||||
isOnline: boolean;
|
||||
authTag: string[];
|
||||
paymentPeriod: number;
|
||||
accountId: number;
|
||||
userId: number;
|
||||
priceType: number;
|
||||
premium: string;
|
||||
quantity: string;
|
||||
frozenQuantity: string;
|
||||
executedQuantity: string;
|
||||
remark: string;
|
||||
status: number;
|
||||
createDate: string;
|
||||
orderNum: string;
|
||||
finishNum: string;
|
||||
fee: string;
|
||||
lastLogoutTime: string;
|
||||
blocked: string;
|
||||
makerContact: boolean;
|
||||
symbolInfo: {
|
||||
id: string;
|
||||
exchangeId: string;
|
||||
orgId: string;
|
||||
tokenId: string;
|
||||
currencyId: string;
|
||||
status: string;
|
||||
lowerLimitAlarm: number;
|
||||
upperLimitAlarm: number;
|
||||
itemDownRange: string;
|
||||
itemUpRange: string;
|
||||
currencyMinQuote: string;
|
||||
currencyMaxQuote: string;
|
||||
currencyLowerMaxQuote: string;
|
||||
tokenMinQuote: string;
|
||||
tokenMaxQuote: string;
|
||||
kycCurrencyLimit: string;
|
||||
itemSideLimit: string;
|
||||
buyFeeRate: string;
|
||||
sellFeeRate: string;
|
||||
orderAutoCancelMinute: number;
|
||||
orderFinishMinute: number;
|
||||
tradeSide: number;
|
||||
currency: {
|
||||
id: string;
|
||||
exchangeId: string;
|
||||
orgId: string;
|
||||
currencyId: string;
|
||||
scale: number;
|
||||
};
|
||||
token: {
|
||||
id: string;
|
||||
exchangeId: string;
|
||||
orgId: string;
|
||||
tokenId: string;
|
||||
scale: number;
|
||||
sequence: number;
|
||||
};
|
||||
buyAd: number;
|
||||
sellAd: number;
|
||||
};
|
||||
tradingPreferenceSet: {
|
||||
hasUnPostAd: number;
|
||||
isKyc: number;
|
||||
isEmail: number;
|
||||
isMobile: number;
|
||||
hasRegisterTime: number;
|
||||
registerTimeThreshold: number;
|
||||
orderFinishNumberDay30: number;
|
||||
completeRateDay30: number;
|
||||
nationalLimit: number;
|
||||
hasOrderFinishNumberDay30: number;
|
||||
hasCompleteRateDay30: number;
|
||||
hasNationalLimit: number;
|
||||
};
|
||||
version: number;
|
||||
authStatus: number;
|
||||
recommend: boolean;
|
||||
recommendTag: string;
|
||||
userType: string;
|
||||
itemType: string;
|
||||
}
|
||||
|
||||
export interface P2POnlineAdsResponseV5 {
|
||||
count: number;
|
||||
items: P2POnlineAdV5[];
|
||||
}
|
||||
|
||||
export interface P2PCreateAdResponseV5 {
|
||||
itemId: string;
|
||||
securityRiskToken: string;
|
||||
riskTokenType: string;
|
||||
riskVersion: string;
|
||||
needSecurityRisk: boolean;
|
||||
}
|
||||
|
||||
export interface P2PPaymentTermV5 {
|
||||
id: string;
|
||||
realName: string;
|
||||
paymentType: number;
|
||||
bankName: string;
|
||||
branchName: string;
|
||||
accountNo: string;
|
||||
qrcode: string;
|
||||
visible: number;
|
||||
payMessage: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
secondLastName: string;
|
||||
clabe: string;
|
||||
debitCardNumber: string;
|
||||
mobile: string;
|
||||
businessName: string;
|
||||
concept: string;
|
||||
paymentExt1: string;
|
||||
paymentExt2: string;
|
||||
paymentExt3: string;
|
||||
paymentExt4: string;
|
||||
paymentExt5: string;
|
||||
paymentExt6: string;
|
||||
paymentTemplateVersion: number;
|
||||
paymentConfig: {
|
||||
paymentType: number;
|
||||
paymentName: string;
|
||||
paymentDialect: string;
|
||||
};
|
||||
realNameVerified: boolean;
|
||||
}
|
||||
|
||||
export interface P2PAdDetailV5 {
|
||||
id: string;
|
||||
accountId: string;
|
||||
userId: string;
|
||||
nickName: string;
|
||||
tokenId: string;
|
||||
tokenName: string;
|
||||
currencyId: string;
|
||||
side: number;
|
||||
priceType: number;
|
||||
price: string;
|
||||
premium: string;
|
||||
lastQuantity: string;
|
||||
quantity: string;
|
||||
frozenQuantity: string;
|
||||
executedQuantity: string;
|
||||
minAmount: string;
|
||||
maxAmount: string;
|
||||
remark: string;
|
||||
status: number;
|
||||
createDate: string;
|
||||
payments: string[];
|
||||
orderNum: number;
|
||||
finishNum: number;
|
||||
recentOrderNum: number;
|
||||
recentExecuteRate: number;
|
||||
fee: string;
|
||||
isOnline: boolean;
|
||||
lastLogoutTime: string;
|
||||
symbolInfo: {
|
||||
id: string;
|
||||
exchangeId: string;
|
||||
orgId: string;
|
||||
tokenId: string;
|
||||
currencyId: string;
|
||||
status: number;
|
||||
lowerLimitAlarm: number;
|
||||
upperLimitAlarm: number;
|
||||
itemDownRange: string;
|
||||
itemUpRange: string;
|
||||
currencyMinQuote: string;
|
||||
currencyMaxQuote: string;
|
||||
currencyLowerMaxQuote: string;
|
||||
tokenMinQuote: string;
|
||||
tokenMaxQuote: string;
|
||||
kycCurrencyLimit: string;
|
||||
itemSideLimit: number;
|
||||
buyFeeRate: string;
|
||||
sellFeeRate: string;
|
||||
orderAutoCancelMinute: number;
|
||||
orderFinishMinute: number;
|
||||
tradeSide: number;
|
||||
currency: {
|
||||
id: string;
|
||||
exchangeId: string;
|
||||
orgId: string;
|
||||
currencyId: string;
|
||||
scale: number;
|
||||
};
|
||||
token: {
|
||||
id: string;
|
||||
exchangeId: string;
|
||||
orgId: string;
|
||||
tokenId: string;
|
||||
scale: number;
|
||||
sequence: number;
|
||||
};
|
||||
buyAd: {
|
||||
paymentPeriods: number[];
|
||||
};
|
||||
sellAd: {
|
||||
paymentPeriods: number[];
|
||||
};
|
||||
};
|
||||
tradingPreferenceSet: P2PTradingPreferenceSetV5;
|
||||
paymentTerms: P2PPaymentTermV5[];
|
||||
version: number;
|
||||
updateDate: string;
|
||||
feeRate: string;
|
||||
paymentPeriod: number;
|
||||
itemType: string;
|
||||
}
|
||||
|
||||
export interface P2PPersonalAdsResponseV5 {
|
||||
count: number;
|
||||
items: P2PAdDetailV5[];
|
||||
hiddenFlag: boolean;
|
||||
}
|
||||
|
||||
export interface P2POrderExtensionV5 {
|
||||
isDelayWithdraw: boolean;
|
||||
delayTime: string;
|
||||
startTime: string;
|
||||
}
|
||||
|
||||
export interface P2POrderV5 {
|
||||
id: string;
|
||||
side: number;
|
||||
tokenId: string;
|
||||
orderType: string;
|
||||
amount: string;
|
||||
currencyId: string;
|
||||
price: string;
|
||||
notifyTokenQuantity?: string;
|
||||
notifyTokenId?: string;
|
||||
fee: string;
|
||||
targetNickName: string;
|
||||
targetUserId: string;
|
||||
status: number;
|
||||
selfUnreadMsgCount: string;
|
||||
createDate: string;
|
||||
transferLastSeconds: string;
|
||||
appealLastSeconds: string;
|
||||
userId: string;
|
||||
sellerRealName: string;
|
||||
buyerRealName: string;
|
||||
judgeInfo: {
|
||||
autoJudgeUnlockTime: string;
|
||||
dissentResult: string;
|
||||
preDissent: string;
|
||||
postDissent: string;
|
||||
};
|
||||
unreadMsgCount: string;
|
||||
extension: P2POrderExtensionV5;
|
||||
bulkOrderFlag: boolean;
|
||||
}
|
||||
|
||||
export interface P2POrdersResponseV5 {
|
||||
count: number;
|
||||
items: P2POrderV5[];
|
||||
}
|
||||
|
||||
export interface P2PPaymentConfigItemV5 {
|
||||
view: boolean;
|
||||
name: string;
|
||||
label: string;
|
||||
placeholder: string;
|
||||
type: string;
|
||||
maxLength: string;
|
||||
required: boolean;
|
||||
}
|
||||
|
||||
export interface P2PPaymentConfigV5 {
|
||||
paymentType: string;
|
||||
checkType: number;
|
||||
sort: number;
|
||||
paymentName: string;
|
||||
addTips: string;
|
||||
itemTips: string;
|
||||
online: number;
|
||||
items: P2PPaymentConfigItemV5[];
|
||||
}
|
||||
|
||||
export interface P2PPaymentTermDetailV5 {
|
||||
id: string;
|
||||
realName: string;
|
||||
paymentType: number;
|
||||
bankName: string;
|
||||
branchName: string;
|
||||
accountNo: string;
|
||||
qrcode: string;
|
||||
visible: number;
|
||||
payMessage: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
secondLastName: string;
|
||||
clabe: string;
|
||||
debitCardNumber: string;
|
||||
mobile: string;
|
||||
businessName: string;
|
||||
concept: string;
|
||||
online: string;
|
||||
paymentExt1: string;
|
||||
paymentExt2: string;
|
||||
paymentExt3: string;
|
||||
paymentExt4: string;
|
||||
paymentExt5: string;
|
||||
paymentExt6: string;
|
||||
paymentTemplateVersion: number;
|
||||
paymentConfigVo: P2PPaymentConfigV5;
|
||||
ruPaymentPrompt: boolean;
|
||||
}
|
||||
|
||||
export interface P2PAppraiseInfoV5 {
|
||||
anonymous: string;
|
||||
appraiseContent: string;
|
||||
appraiseId: string;
|
||||
appraiseType: string;
|
||||
modifyFlag: string;
|
||||
updateDate: string;
|
||||
}
|
||||
|
||||
export interface P2PJudgeInfoV5 {
|
||||
autoJudgeUnlockTime: string;
|
||||
dissentResult: string;
|
||||
preDissent: string;
|
||||
postDissent: string;
|
||||
}
|
||||
|
||||
export interface P2POrderDetailV5 {
|
||||
id: string;
|
||||
side: number;
|
||||
itemId: string;
|
||||
accountId: string;
|
||||
userId: string;
|
||||
nickName: string;
|
||||
makerUserId: string;
|
||||
targetAccountId: string;
|
||||
targetUserId: string;
|
||||
targetNickName: string;
|
||||
targetFirstName: string;
|
||||
targetSecondName: string;
|
||||
targetUserAuthStatus: number;
|
||||
targetConnectInformation: string;
|
||||
payerRealName: string;
|
||||
sellerRealName: string;
|
||||
buyerRealName: string;
|
||||
tokenId: string;
|
||||
tokenName: string;
|
||||
currencyId: string;
|
||||
price: string;
|
||||
quantity: string;
|
||||
amount: string;
|
||||
payCode: string;
|
||||
paymentType: number;
|
||||
transferDate: string;
|
||||
status: number;
|
||||
createDate: string;
|
||||
paymentTermList: P2PPaymentTermDetailV5[];
|
||||
remark: string;
|
||||
transferLastSeconds: string;
|
||||
recentOrderNum: number;
|
||||
recentExecuteRate: number;
|
||||
appealLastSeconds: string;
|
||||
appealContent: string;
|
||||
appealType: number;
|
||||
appealNickName: string;
|
||||
canAppeal: string;
|
||||
totalAppealTimes: string;
|
||||
appealedTimes: string;
|
||||
paymentTermResult: P2PPaymentTermDetailV5;
|
||||
orderFinishMinute: number;
|
||||
confirmedPayTerm: P2PPaymentTermDetailV5;
|
||||
makerFee: string;
|
||||
takerFee: string;
|
||||
fee: string;
|
||||
showContact: boolean;
|
||||
tokenBalance: string;
|
||||
fiatBalance: string;
|
||||
unreadMsgCount: string;
|
||||
updateDate: string;
|
||||
extension: P2POrderExtensionV5;
|
||||
selfUnreadMsgCount: string;
|
||||
judgeType: string;
|
||||
canReport: boolean;
|
||||
canReportDisagree: boolean;
|
||||
canReportType: string[];
|
||||
canReportDisagreeType: string[];
|
||||
appraiseStatus: string;
|
||||
appraiseInfo: P2PAppraiseInfoV5;
|
||||
canReportDisagreeTypes: string[];
|
||||
canReportTypes: string[];
|
||||
orderType: string;
|
||||
middleToken: string;
|
||||
beforePrice: string;
|
||||
beforeQuantity: string;
|
||||
beforeToken: string;
|
||||
alternative: string;
|
||||
appealUserId: string;
|
||||
notifyTokenId: string;
|
||||
notifyTokenQuantity: string;
|
||||
cancelResponsible: string;
|
||||
chainType: string;
|
||||
chainAddress: string;
|
||||
tradeHashCode: string;
|
||||
estimatedGasFee: string;
|
||||
gasFeeTokenId: string;
|
||||
tradingFeeTokenId: string;
|
||||
onChainInfo: string;
|
||||
transactionId: string;
|
||||
displayRefund: string;
|
||||
chainWithdrawLastSeconds: string;
|
||||
chainTransferLastSeconds: string;
|
||||
orderSource: string;
|
||||
cancelReason: string;
|
||||
sellerCancelExamineRemainTime: string;
|
||||
needSellerExamineCancel: boolean;
|
||||
couponCurrencyAmount: string;
|
||||
totalCurrencyAmount: string;
|
||||
usedCoupon: boolean;
|
||||
couponTokenId: string;
|
||||
couponQuantity: string;
|
||||
completedOrderAppealCount: number;
|
||||
totalCompletedOrderAppealCount: number;
|
||||
realOrderStatus: number;
|
||||
appealVersion: number;
|
||||
judgeInfo: P2PJudgeInfoV5;
|
||||
helpType: string;
|
||||
appealFlowStatus: string;
|
||||
appealSubStatus: string;
|
||||
bulkOrderFlag: boolean;
|
||||
targetUserType: string;
|
||||
targetUserDisplays: string[];
|
||||
appealProcessChangeFlag: boolean;
|
||||
appealNegotiationNode: number;
|
||||
}
|
||||
|
||||
export interface P2POrderMessageV5 {
|
||||
id: string;
|
||||
message: string;
|
||||
userId: string;
|
||||
msgType: number;
|
||||
msgCode: number;
|
||||
createDate: string;
|
||||
contentType: string;
|
||||
orderId: string;
|
||||
msgUuid: string;
|
||||
nickName: string;
|
||||
fileName: string;
|
||||
accountId: string;
|
||||
isRead: number;
|
||||
read: number;
|
||||
roleType: string;
|
||||
onlyForCustomer: number;
|
||||
}
|
||||
|
||||
export interface P2PUserInfoV5 {
|
||||
nickName: string;
|
||||
defaultNickName: boolean;
|
||||
isOnline: boolean;
|
||||
kycLevel: string;
|
||||
email: string;
|
||||
mobile: string;
|
||||
lastLogoutTime: string;
|
||||
recentRate: string;
|
||||
totalFinishCount: number;
|
||||
totalFinishSellCount: number;
|
||||
totalFinishBuyCount: number;
|
||||
recentFinishCount: number;
|
||||
averageReleaseTime: string;
|
||||
averageTransferTime: string;
|
||||
accountCreateDays: number;
|
||||
firstTradeDays: number;
|
||||
realName: string;
|
||||
recentTradeAmount: string;
|
||||
totalTradeAmount: string;
|
||||
registerTime: string;
|
||||
authStatus: number;
|
||||
kycCountryCode: string;
|
||||
blocked: string;
|
||||
goodAppraiseRate: string;
|
||||
goodAppraiseCount: number;
|
||||
badAppraiseCount: number;
|
||||
accountId: number;
|
||||
paymentCount: number;
|
||||
contactCount: number;
|
||||
vipLevel: number;
|
||||
userCancelCountLimit: number;
|
||||
paymentRealNameUneditable: boolean;
|
||||
userId: string;
|
||||
realNameEn: string;
|
||||
}
|
||||
|
||||
export interface P2PCounterpartyUserInfoV5 {
|
||||
nickName: string;
|
||||
defaultNickName: boolean;
|
||||
whiteFlag: number;
|
||||
contactConfig: boolean;
|
||||
isOnline: boolean;
|
||||
email: string;
|
||||
mobile: string;
|
||||
kycLevel: number;
|
||||
lastLogoutTime: string;
|
||||
recentRate: number;
|
||||
totalFinishCount: number;
|
||||
totalFinishSellCount: number;
|
||||
totalFinishBuyCount: number;
|
||||
recentFinishCount: number;
|
||||
averageReleaseTime: string;
|
||||
averageTransferTime: string;
|
||||
accountCreateDays: number;
|
||||
firstTradeDays: number;
|
||||
realName: string;
|
||||
recentTradeAmount: string;
|
||||
totalTradeAmount: string;
|
||||
executeNum: number;
|
||||
orderNum: number;
|
||||
hasUnPostAd: number;
|
||||
registerTime: string;
|
||||
authStatus: number;
|
||||
kycCountryCode: string;
|
||||
blocked: string;
|
||||
goodAppraiseRate: string;
|
||||
goodAppraiseCount: number;
|
||||
badAppraiseCount: number;
|
||||
accountId: string;
|
||||
paymentCount: number;
|
||||
contactCount: number;
|
||||
realNameMask: string;
|
||||
vipLevel: number;
|
||||
vipProfit: [];
|
||||
userTag: [];
|
||||
userCancelCountLimit: number;
|
||||
paymentRealNameUneditable: boolean;
|
||||
lostRoleAffected: boolean;
|
||||
userCurPrivilege: string[];
|
||||
userType: string;
|
||||
userId: string;
|
||||
realNameEn: string;
|
||||
canSubOnline: boolean;
|
||||
curPrivilegeInfo: [];
|
||||
openApiSwitch: number;
|
||||
}
|
||||
|
||||
export interface P2PUserPaymentV5 {
|
||||
id: string;
|
||||
realName: string;
|
||||
paymentType: string;
|
||||
bankName: string;
|
||||
branchName: string;
|
||||
accountNo: string;
|
||||
qrcode: string;
|
||||
visible: number;
|
||||
payMessage: string;
|
||||
firstName: string;
|
||||
lastName: string;
|
||||
secondLastName: string;
|
||||
clabe: string;
|
||||
debitCardNumber: string;
|
||||
mobile: string;
|
||||
businessName: string;
|
||||
concept: string;
|
||||
online: string;
|
||||
countNo: string;
|
||||
paymentExt1: string;
|
||||
paymentExt2: string;
|
||||
paymentExt3: string;
|
||||
paymentExt4: string;
|
||||
paymentExt5: string;
|
||||
paymentExt6: string;
|
||||
paymentTemplateVersion: number;
|
||||
hasPaymentTemplateChanged: boolean;
|
||||
paymentConfigVo: P2PPaymentConfigV5;
|
||||
realNameVerified: boolean;
|
||||
channel: string;
|
||||
currencyBalance: string[];
|
||||
}
|
||||
Reference in New Issue
Block a user