@riocrypto/common 1.0.1508 → 1.0.1510
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.
|
@@ -52,6 +52,9 @@ import { BankAccountVerification } from "../types/bank-account-verification";
|
|
|
52
52
|
import { MultipartLiquidityOrder } from "../types/multipart-liquidity-order";
|
|
53
53
|
import { LiquidityOrderRecipe } from "../types/liquidity-order-recipe";
|
|
54
54
|
import { Onboarding } from "../types/onboarding";
|
|
55
|
+
import { AlertTriggerCondition } from "../types/alert-trigger-condition";
|
|
56
|
+
import { Side } from "../types/side";
|
|
57
|
+
import { Alert } from "../types/alert";
|
|
55
58
|
export declare class RioAdminClient {
|
|
56
59
|
private axios;
|
|
57
60
|
constructor(axios: AxiosStatic | AxiosInstance);
|
|
@@ -80,6 +83,33 @@ export declare class RioAdminClient {
|
|
|
80
83
|
createTemporaryVerification(phoneNumber: string): Promise<{
|
|
81
84
|
code: string;
|
|
82
85
|
}>;
|
|
86
|
+
createAlert({ priceTrigger, liquidityTrigger, destinationType, telegramDestination, }: {
|
|
87
|
+
priceTrigger?: {
|
|
88
|
+
condition: AlertTriggerCondition;
|
|
89
|
+
value: number;
|
|
90
|
+
side: Side;
|
|
91
|
+
fiat: Fiat;
|
|
92
|
+
crypto: Crypto;
|
|
93
|
+
cooldown?: number;
|
|
94
|
+
};
|
|
95
|
+
liquidityTrigger?: {
|
|
96
|
+
condition: AlertTriggerCondition;
|
|
97
|
+
value: number;
|
|
98
|
+
assetType?: "crypto" | "fiat";
|
|
99
|
+
asset?: Crypto | Fiat;
|
|
100
|
+
cooldown?: number;
|
|
101
|
+
};
|
|
102
|
+
destinationType: "telegram";
|
|
103
|
+
telegramDestination: {
|
|
104
|
+
chatId?: string;
|
|
105
|
+
username?: string;
|
|
106
|
+
};
|
|
107
|
+
}): Promise<{
|
|
108
|
+
code: string;
|
|
109
|
+
}>;
|
|
110
|
+
getAlerts(): Promise<Alert[]>;
|
|
111
|
+
getAlert(id: string): Promise<Alert>;
|
|
112
|
+
deleteAlert(id: string): Promise<void>;
|
|
83
113
|
deleteTemporaryVerification(id: string): Promise<{
|
|
84
114
|
code: string;
|
|
85
115
|
}>;
|
|
@@ -133,6 +133,34 @@ class RioAdminClient {
|
|
|
133
133
|
return data;
|
|
134
134
|
});
|
|
135
135
|
}
|
|
136
|
+
createAlert({ priceTrigger, liquidityTrigger, destinationType, telegramDestination, }) {
|
|
137
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
138
|
+
const { data } = yield this.axios.post("/api/alerts", {
|
|
139
|
+
priceTrigger,
|
|
140
|
+
liquidityTrigger,
|
|
141
|
+
destinationType,
|
|
142
|
+
telegramDestination,
|
|
143
|
+
});
|
|
144
|
+
return data;
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
getAlerts() {
|
|
148
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
149
|
+
const { data } = yield this.axios.get("/api/alerts");
|
|
150
|
+
return data;
|
|
151
|
+
});
|
|
152
|
+
}
|
|
153
|
+
getAlert(id) {
|
|
154
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
155
|
+
const { data } = yield this.axios.get(`/api/alerts/${id}`);
|
|
156
|
+
return data;
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
deleteAlert(id) {
|
|
160
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
161
|
+
yield this.axios.delete(`/api/alerts/${id}`);
|
|
162
|
+
});
|
|
163
|
+
}
|
|
136
164
|
deleteTemporaryVerification(id) {
|
|
137
165
|
return __awaiter(this, void 0, void 0, function* () {
|
|
138
166
|
const { data } = yield this.axios.delete(`/api/auth/temporary-verifications/${id}`);
|
|
@@ -42,6 +42,9 @@ import { BidInput } from "../types/bid-input";
|
|
|
42
42
|
import { AddressVerification } from "../types/address-verification";
|
|
43
43
|
import { BankAccountVerification } from "../types/bank-account-verification";
|
|
44
44
|
import { Onboarding } from "../types/onboarding";
|
|
45
|
+
import { Alert } from "../types/alert";
|
|
46
|
+
import { AlertTriggerCondition } from "../types/alert-trigger-condition";
|
|
47
|
+
import { Side } from "../types/side";
|
|
45
48
|
export declare class RioClient {
|
|
46
49
|
private axios;
|
|
47
50
|
constructor(axios: AxiosStatic | AxiosInstance);
|
|
@@ -53,6 +56,33 @@ export declare class RioClient {
|
|
|
53
56
|
}>;
|
|
54
57
|
exportOrders(page: number, startDate: Date, endDate: Date, query?: OrderQuery): Promise<Order[]>;
|
|
55
58
|
getOrders(page: number, limit?: number, query?: OrderQuery, includeOwnOrders?: boolean, startDate?: Date, endDate?: Date): Promise<Order[]>;
|
|
59
|
+
createAlert({ priceTrigger, liquidityTrigger, destinationType, telegramDestination, }: {
|
|
60
|
+
priceTrigger?: {
|
|
61
|
+
condition: AlertTriggerCondition;
|
|
62
|
+
value: number;
|
|
63
|
+
side: Side;
|
|
64
|
+
fiat: Fiat;
|
|
65
|
+
crypto: Crypto;
|
|
66
|
+
cooldown?: number;
|
|
67
|
+
};
|
|
68
|
+
liquidityTrigger?: {
|
|
69
|
+
condition: AlertTriggerCondition;
|
|
70
|
+
value: number;
|
|
71
|
+
assetType?: "crypto" | "fiat";
|
|
72
|
+
asset?: Crypto | Fiat;
|
|
73
|
+
cooldown?: number;
|
|
74
|
+
};
|
|
75
|
+
destinationType: "telegram";
|
|
76
|
+
telegramDestination: {
|
|
77
|
+
chatId?: string;
|
|
78
|
+
username?: string;
|
|
79
|
+
};
|
|
80
|
+
}): Promise<{
|
|
81
|
+
code: string;
|
|
82
|
+
}>;
|
|
83
|
+
getAlerts(): Promise<Alert[]>;
|
|
84
|
+
getAlert(id: string): Promise<Alert>;
|
|
85
|
+
deleteAlert(id: string): Promise<void>;
|
|
56
86
|
updateOrder(id: string, update: {
|
|
57
87
|
notes: string;
|
|
58
88
|
}): Promise<Order>;
|
|
@@ -76,6 +76,34 @@ class RioClient {
|
|
|
76
76
|
return data;
|
|
77
77
|
});
|
|
78
78
|
}
|
|
79
|
+
createAlert({ priceTrigger, liquidityTrigger, destinationType, telegramDestination, }) {
|
|
80
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
81
|
+
const { data } = yield this.axios.post("/api/alerts", {
|
|
82
|
+
priceTrigger,
|
|
83
|
+
liquidityTrigger,
|
|
84
|
+
destinationType,
|
|
85
|
+
telegramDestination,
|
|
86
|
+
});
|
|
87
|
+
return data;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
getAlerts() {
|
|
91
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
92
|
+
const { data } = yield this.axios.get("/api/alerts");
|
|
93
|
+
return data;
|
|
94
|
+
});
|
|
95
|
+
}
|
|
96
|
+
getAlert(id) {
|
|
97
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
98
|
+
const { data } = yield this.axios.get(`/api/alerts/${id}`);
|
|
99
|
+
return data;
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
deleteAlert(id) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
104
|
+
yield this.axios.delete(`/api/alerts/${id}`);
|
|
105
|
+
});
|
|
106
|
+
}
|
|
79
107
|
updateOrder(id, update) {
|
|
80
108
|
return __awaiter(this, void 0, void 0, function* () {
|
|
81
109
|
const { data } = yield this.axios.patch(`/api/orders/${id}`, update);
|