@riocrypto/common-server 1.0.1135 → 1.0.1137

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.
@@ -117,7 +117,7 @@ class BitsoClient {
117
117
  major: major.toString(),
118
118
  price: price.toString(),
119
119
  side,
120
- time_in_force: "fillorkill",
120
+ time_in_force: "postonly",
121
121
  type: "limit",
122
122
  },
123
123
  };
package/build/index.d.ts CHANGED
@@ -43,7 +43,6 @@ export * from "./models/chained-quote";
43
43
  export * from "./models/chained-order";
44
44
  export * from "./models/bitso-bank-account";
45
45
  export * from "./models/bitso-receiving-account";
46
- export * from "./models/bitso-exchange-rate-order";
47
46
  export * from "./clients/bitstamp-client";
48
47
  export * from "./clients/ccxt-client";
49
48
  export * from "./clients/kushki-client";
package/build/index.js CHANGED
@@ -59,7 +59,6 @@ __exportStar(require("./models/chained-quote"), exports);
59
59
  __exportStar(require("./models/chained-order"), exports);
60
60
  __exportStar(require("./models/bitso-bank-account"), exports);
61
61
  __exportStar(require("./models/bitso-receiving-account"), exports);
62
- __exportStar(require("./models/bitso-exchange-rate-order"), exports);
63
62
  __exportStar(require("./clients/bitstamp-client"), exports);
64
63
  __exportStar(require("./clients/ccxt-client"), exports);
65
64
  __exportStar(require("./clients/kushki-client"), exports);
@@ -1,4 +1,4 @@
1
- import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, Partner } from "@riocrypto/common";
1
+ import { Country, Fees, Fiat, LiquidityProvider, OrderStatus, PaymentMethod, PayoutMethod, Processor, Side, Crypto, Partner, ExchangeRateOrder } from "@riocrypto/common";
2
2
  import { Mongoose, Model, Document } from "mongoose";
3
3
  interface OrderAttrs {
4
4
  quoteId: string;
@@ -38,6 +38,7 @@ interface OrderAttrs {
38
38
  managedWallet?: boolean;
39
39
  sourceUserId?: string;
40
40
  amountFixed?: number;
41
+ exchangeRateOrders?: ExchangeRateOrder[];
41
42
  }
42
43
  interface OrderDoc extends Document {
43
44
  quoteId: string;
@@ -77,6 +78,7 @@ interface OrderDoc extends Document {
77
78
  managedWallet?: boolean;
78
79
  sourceUserId?: string;
79
80
  amountFixed?: number;
81
+ exchangeRateOrders?: ExchangeRateOrder[];
80
82
  }
81
83
  interface OrderModel extends Model<OrderDoc> {
82
84
  build(attrs: OrderAttrs): OrderDoc;
@@ -157,6 +157,22 @@ const buildOrder = (mongoose) => {
157
157
  amountFixed: {
158
158
  type: Number,
159
159
  },
160
+ exchangeRateOrders: [
161
+ {
162
+ amount: {
163
+ type: Number,
164
+ },
165
+ price: {
166
+ type: String,
167
+ },
168
+ provider: {
169
+ type: String,
170
+ },
171
+ providerId: {
172
+ type: String,
173
+ },
174
+ },
175
+ ],
160
176
  }, {
161
177
  toJSON: {
162
178
  transform(doc, ret) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@riocrypto/common-server",
3
- "version": "1.0.1135",
3
+ "version": "1.0.1137",
4
4
  "description": "",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
@@ -26,7 +26,7 @@
26
26
  "@aws-sdk/client-s3": "^3.297.0",
27
27
  "@everapi/currencyapi-js": "^1.0.6",
28
28
  "@google-cloud/storage": "^6.9.5",
29
- "@riocrypto/common": "^1.0.977",
29
+ "@riocrypto/common": "^1.0.988",
30
30
  "@types/express": "^4.17.13",
31
31
  "axios": "^0.27.2",
32
32
  "ccxt": "^3.0.30",
@@ -1,20 +0,0 @@
1
- import { Mongoose, Model, Document } from "mongoose";
2
- interface BitsoExchangeRateOrderAttrs {
3
- createdAt: Date;
4
- orderId: string;
5
- bitsoOrderId: string;
6
- amount: number;
7
- asset: string;
8
- }
9
- interface BitsoExchangeRateOrderDoc extends Document {
10
- createdAt: Date;
11
- orderId: string;
12
- bitsoOrderId: string;
13
- amount: number;
14
- asset: string;
15
- }
16
- interface BitsoExchangeRateOrderModel extends Model<BitsoExchangeRateOrderDoc> {
17
- build(attrs: BitsoExchangeRateOrderAttrs): BitsoExchangeRateOrderDoc;
18
- }
19
- declare const buildBitsoExchangeRateOrder: (mongoose: Mongoose) => BitsoExchangeRateOrderModel;
20
- export { buildBitsoExchangeRateOrder, BitsoExchangeRateOrderDoc };
@@ -1,45 +0,0 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.buildBitsoExchangeRateOrder = void 0;
4
- const buildBitsoExchangeRateOrder = (mongoose) => {
5
- // if model is already defined, return it
6
- if (mongoose.models.BitsoExchangeRateOrder) {
7
- return mongoose.model("BitsoExchangeRateOrder");
8
- }
9
- const BitsoExchangeRateOrderSchema = new mongoose.Schema({
10
- orderId: {
11
- type: String,
12
- required: true,
13
- },
14
- createdAt: {
15
- type: mongoose.Schema.Types.Date,
16
- required: true,
17
- },
18
- bitsoOrderId: {
19
- type: String,
20
- required: true,
21
- },
22
- amount: {
23
- type: Number,
24
- required: true,
25
- },
26
- asset: {
27
- type: String,
28
- required: true,
29
- },
30
- }, {
31
- toJSON: {
32
- transform(doc, ret) {
33
- ret.id = ret._id.valueOf();
34
- delete ret._id;
35
- delete ret.__v;
36
- },
37
- },
38
- });
39
- BitsoExchangeRateOrderSchema.statics.build = (attrs) => {
40
- return new BitsoExchangeRateOrder(attrs);
41
- };
42
- const BitsoExchangeRateOrder = mongoose.model("BitsoExchangeRateOrder", BitsoExchangeRateOrderSchema);
43
- return BitsoExchangeRateOrder;
44
- };
45
- exports.buildBitsoExchangeRateOrder = buildBitsoExchangeRateOrder;