@riocrypto/common-server 1.0.2547 → 1.0.2548
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, STPMXNWithdrawal, AuthPermission, DeferredPaymentType, TwoWaySettlementType, OrderType, EmarketsSettlementType, EmarketsOrderType, BulkBankPayout, BulkCryptoPayout, BulkBankPayment, BulkCryptoPayment, OrderStatus } from "@riocrypto/common";
|
|
1
|
+
import { Quote, Fiat, Crypto, BitsoBankAccount, Side, Country, Order, CryptoAddress, BankAccount, AuthRole, Auth, ImportOrderData, TreasuryProvider, FXProvider, EmarketsFXTrade, ExternalTradingAlgorithm, ExternalTrade, ExternalTradeType, ExternalTradingProvider, ExternalTradingAlgorithmType, STPMXNWithdrawal, AuthPermission, DeferredPaymentType, TwoWaySettlementType, OrderType, EmarketsSettlementType, EmarketsOrderType, BulkBankPayout, BulkCryptoPayout, BulkBankPayment, BulkCryptoPayment, OrderStatus, TWAPSession } from "@riocrypto/common";
|
|
2
2
|
declare class ClusterClient {
|
|
3
3
|
private baseUrl;
|
|
4
4
|
private clusterApiKey;
|
|
@@ -188,6 +188,23 @@ declare class ClusterClient {
|
|
|
188
188
|
resetBulkCryptoPayment(id: string): Promise<void>;
|
|
189
189
|
resetBulkBankPayout(id: string): Promise<void>;
|
|
190
190
|
resetBulkCryptoPayout(id: string): Promise<void>;
|
|
191
|
+
createTWAPSession({ userId, country, side, crypto, fiat, tradeCurrency, maxOriginAmount, maxDestinationAmount, clipSize, maxAmountPerSettlement, payoutBankAccountId, payoutAddressId, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, }: {
|
|
192
|
+
userId: string;
|
|
193
|
+
country: Country;
|
|
194
|
+
side: Side;
|
|
195
|
+
crypto: Crypto;
|
|
196
|
+
fiat: Fiat;
|
|
197
|
+
tradeCurrency: Fiat | Crypto;
|
|
198
|
+
maxOriginAmount?: number;
|
|
199
|
+
maxDestinationAmount?: number;
|
|
200
|
+
clipSize: number;
|
|
201
|
+
maxAmountPerSettlement?: number;
|
|
202
|
+
payoutBankAccountId?: string;
|
|
203
|
+
payoutAddressId?: string;
|
|
204
|
+
deferredPaymentType?: DeferredPaymentType;
|
|
205
|
+
twoWaySettlementType?: TwoWaySettlementType;
|
|
206
|
+
twoWaySettlementDateOffset?: number;
|
|
207
|
+
}): Promise<TWAPSession>;
|
|
191
208
|
}
|
|
192
209
|
export declare const buildClusterClient: () => Promise<ClusterClient>;
|
|
193
210
|
export {};
|
|
@@ -684,6 +684,28 @@ class ClusterClient {
|
|
|
684
684
|
yield this.axios.post(`${this.baseUrl}/api/payouts/crypto/bulk/${id}/reset`, {}, { headers: { "x-cluster-api-key": this.clusterApiKey } });
|
|
685
685
|
});
|
|
686
686
|
}
|
|
687
|
+
createTWAPSession({ userId, country, side, crypto, fiat, tradeCurrency, maxOriginAmount, maxDestinationAmount, clipSize, maxAmountPerSettlement, payoutBankAccountId, payoutAddressId, deferredPaymentType, twoWaySettlementType, twoWaySettlementDateOffset, }) {
|
|
688
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
689
|
+
const response = yield this.axios.post(`${this.baseUrl}/api/twap/sessions`, {
|
|
690
|
+
userId,
|
|
691
|
+
country,
|
|
692
|
+
side,
|
|
693
|
+
crypto,
|
|
694
|
+
fiat,
|
|
695
|
+
tradeCurrency,
|
|
696
|
+
maxOriginAmount,
|
|
697
|
+
maxDestinationAmount,
|
|
698
|
+
clipSize,
|
|
699
|
+
maxAmountPerSettlement,
|
|
700
|
+
payoutBankAccountId,
|
|
701
|
+
payoutAddressId,
|
|
702
|
+
deferredPaymentType,
|
|
703
|
+
twoWaySettlementType,
|
|
704
|
+
twoWaySettlementDateOffset,
|
|
705
|
+
}, { headers: { "x-cluster-api-key": this.clusterApiKey } });
|
|
706
|
+
return response.data;
|
|
707
|
+
});
|
|
708
|
+
}
|
|
687
709
|
}
|
|
688
710
|
const buildClusterClient = () => __awaiter(void 0, void 0, void 0, function* () {
|
|
689
711
|
// Retrieve secrets asynchronously
|