feat(v4.0.2): Add full support for P2P trading
This commit is contained in:
@@ -47,6 +47,7 @@ import {
|
||||
ConvertHistoryRecordV5,
|
||||
ConvertQuoteV5,
|
||||
ConvertStatusV5,
|
||||
CreateP2PAdParamsV5,
|
||||
CreateSubApiKeyParamsV5,
|
||||
CreateSubApiKeyResultV5,
|
||||
CreateSubMemberParamsV5,
|
||||
@@ -59,6 +60,9 @@ import {
|
||||
DeliveryRecordV5,
|
||||
DepositAddressChainV5,
|
||||
DepositRecordV5,
|
||||
EarnOrderHistory,
|
||||
EarnPosition,
|
||||
EarnProduct,
|
||||
ExchangeBrokerAccountInfoV5,
|
||||
ExchangeBrokerEarningResultV5,
|
||||
ExchangeBrokerSubAccountDepositRecordV5,
|
||||
@@ -82,6 +86,8 @@ import {
|
||||
GetDeliveryPriceParamsV5,
|
||||
GetDeliveryRecordParamsV5,
|
||||
GetDepositRecordParamsV5,
|
||||
GetEarnOrderHistoryParams,
|
||||
GetEarnPositionParams,
|
||||
GetExchangeBrokerEarningsParamsV5,
|
||||
GetExecutionListParamsV5,
|
||||
GetFeeRateParamsV5,
|
||||
@@ -100,6 +106,13 @@ import {
|
||||
GetOpenInterestParamsV5,
|
||||
GetOptionDeliveryPriceParamsV5,
|
||||
GetOrderbookParamsV5,
|
||||
GetP2PAccountCoinsBalanceParamsV5,
|
||||
GetP2PCounterpartyUserInfoParamsV5,
|
||||
GetP2POnlineAdsParamsV5,
|
||||
GetP2POrderMessagesParamsV5,
|
||||
GetP2POrdersParamsV5,
|
||||
GetP2PPendingOrdersParamsV5,
|
||||
GetP2PPersonalAdsParamsV5,
|
||||
GetPreUpgradeClosedPnlParamsV5,
|
||||
GetPreUpgradeOptionDeliveryRecordParamsV5,
|
||||
GetPreUpgradeOrderHistoryParamsV5,
|
||||
@@ -133,6 +146,7 @@ import {
|
||||
LongShortRatioV5,
|
||||
MMPModifyParamsV5,
|
||||
MMPStateV5,
|
||||
MarkP2POrderAsPaidParamsV5,
|
||||
MovePositionHistoryV5,
|
||||
MovePositionParamsV5,
|
||||
MovePositionResultV5,
|
||||
@@ -144,6 +158,17 @@ import {
|
||||
OrderResultV5,
|
||||
OrderSideV5,
|
||||
OrderbookResponseV5,
|
||||
P2PAccountCoinsBalanceV5,
|
||||
P2PAdDetailV5,
|
||||
P2PCounterpartyUserInfoV5,
|
||||
P2PCreateAdResponseV5,
|
||||
P2POnlineAdsResponseV5,
|
||||
P2POrderDetailV5,
|
||||
P2POrderMessageV5,
|
||||
P2POrdersResponseV5,
|
||||
P2PPersonalAdsResponseV5,
|
||||
P2PUserInfoV5,
|
||||
P2PUserPaymentV5,
|
||||
PositionInfoParamsV5,
|
||||
PositionV5,
|
||||
PreUpgradeOptionsDelivery,
|
||||
@@ -159,6 +184,7 @@ import {
|
||||
RepaymentHistoryV5,
|
||||
RequestConvertQuoteParamsV5,
|
||||
RiskLimitV5,
|
||||
SendP2POrderMessageParamsV5,
|
||||
SetAutoAddMarginParamsV5,
|
||||
SetCollateralCoinParamsV5,
|
||||
SetLeverageParamsV5,
|
||||
@@ -171,6 +197,7 @@ import {
|
||||
SpotLeveragedTokenOrderHistoryV5,
|
||||
SpotMarginStateV5,
|
||||
SubMemberV5,
|
||||
SubmitStakeRedeemParams,
|
||||
SwitchIsolatedMarginParamsV5,
|
||||
SwitchPositionModeParamsV5,
|
||||
TPSLModeV5,
|
||||
@@ -184,6 +211,7 @@ import {
|
||||
UnpaidLoanOrderV5,
|
||||
UpdateApiKeyParamsV5,
|
||||
UpdateApiKeyResultV5,
|
||||
UpdateP2PAdParamsV5,
|
||||
VIPMarginDataV5,
|
||||
VaspEntityV5,
|
||||
VipBorrowableCoinsV5,
|
||||
@@ -193,17 +221,6 @@ import {
|
||||
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';
|
||||
|
||||
@@ -2625,4 +2642,201 @@ export class RestClientV5 extends BaseRestClient {
|
||||
> {
|
||||
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';
|
||||
|
||||
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';
|
||||
|
||||
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