@riocrypto/common 1.0.1532 → 1.0.1534

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.
@@ -60,6 +60,7 @@ import { WebhookType } from "../types/webhook-type";
60
60
  import { WebhookRegistration } from "../types/webhook-registration";
61
61
  import { AdminActionType } from "../types/admin-action-type";
62
62
  import { AdminAction } from "../types/admin-action";
63
+ import { ArbitrageSettings } from "../types/arbitrage-settings";
63
64
  export declare class RioAdminClient {
64
65
  private axios;
65
66
  constructor(axios: AxiosStatic | AxiosInstance);
@@ -340,4 +341,11 @@ export declare class RioAdminClient {
340
341
  getAdminActions(page: number): Promise<AdminAction[]>;
341
342
  getAdminAction(id: string): Promise<AdminAction>;
342
343
  cancelAdminAction(id: string): Promise<void>;
344
+ createArbitrageSettings({ arbitrageSettings, }: {
345
+ arbitrageSettings: ArbitrageSettings;
346
+ }): Promise<ArbitrageSettings>;
347
+ getArbitrageSettings(): Promise<ArbitrageSettings>;
348
+ updateArbitrageSettings({ arbitrageSettings, }: {
349
+ arbitrageSettings: ArbitrageSettings;
350
+ }): Promise<ArbitrageSettings>;
343
351
  }
@@ -1090,5 +1090,23 @@ class RioAdminClient {
1090
1090
  yield this.axios.put(`/api/admin/actions/${id}/cancel`);
1091
1091
  });
1092
1092
  }
1093
+ createArbitrageSettings({ arbitrageSettings, }) {
1094
+ return __awaiter(this, void 0, void 0, function* () {
1095
+ const { data } = yield this.axios.post(`/api/arbitrage/settings`, arbitrageSettings);
1096
+ return data;
1097
+ });
1098
+ }
1099
+ getArbitrageSettings() {
1100
+ return __awaiter(this, void 0, void 0, function* () {
1101
+ const { data } = yield this.axios.get("/api/arbitrage/settings");
1102
+ return data;
1103
+ });
1104
+ }
1105
+ updateArbitrageSettings({ arbitrageSettings, }) {
1106
+ return __awaiter(this, void 0, void 0, function* () {
1107
+ const { data } = yield this.axios.patch(`/api/arbitrage/settings`, arbitrageSettings);
1108
+ return data;
1109
+ });
1110
+ }
1093
1111
  }
1094
1112
  exports.RioAdminClient = RioAdminClient;
package/build/index.d.ts CHANGED
@@ -248,6 +248,7 @@ export * from "./types/alert-trigger-condition";
248
248
  export * from "./types/admin-action";
249
249
  export * from "./types/admin-action-type";
250
250
  export * from "./types/admin-action-status";
251
+ export * from "./types/arbitrage-settings";
251
252
  export * from "./classes/Asset";
252
253
  export * from "./classes/KYCFieldClass";
253
254
  export * from "./classes/KYCFileClass";
package/build/index.js CHANGED
@@ -264,6 +264,7 @@ __exportStar(require("./types/alert-trigger-condition"), exports);
264
264
  __exportStar(require("./types/admin-action"), exports);
265
265
  __exportStar(require("./types/admin-action-type"), exports);
266
266
  __exportStar(require("./types/admin-action-status"), exports);
267
+ __exportStar(require("./types/arbitrage-settings"), exports);
267
268
  __exportStar(require("./classes/Asset"), exports);
268
269
  __exportStar(require("./classes/KYCFieldClass"), exports);
269
270
  __exportStar(require("./classes/KYCFileClass"), exports);
@@ -0,0 +1,15 @@
1
+ import { Fiat } from "./fiat";
2
+ export interface ArbitrageSettings {
3
+ BuyUSDTAtBitsoSellUSDAtBBVA: {
4
+ minGain: {
5
+ value: number;
6
+ currency: Crypto | Fiat;
7
+ };
8
+ amountAvailableToTrade: {
9
+ value: number;
10
+ currency: Fiat | Crypto;
11
+ lastUpdated: Date;
12
+ frozen?: boolean;
13
+ };
14
+ };
15
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -37,6 +37,7 @@ var OrderStatus;
37
37
  OrderStatus["BankPayoutDetailsAdded"] = "bankPayoutDetailsAdded";
38
38
  // When waiting for asynchronous payment
39
39
  OrderStatus["AwaitingPayment"] = "awaitingPayment";
40
+ // During chained order, when waiting for the transfer to be reissued by the Bridge in case of requote
40
41
  OrderStatus["AwaitingTransferReissue"] = "awaitingTransferReissue";
41
42
  // When waiting for asynchronous payout
42
43
  OrderStatus["AwaitingPayout"] = "awaitingPayout";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common",
3
- "version": "1.0.1532",
3
+ "version": "1.0.1534",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",