@riocrypto/common-server 1.0.1128 → 1.0.1130
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.
|
@@ -10,8 +10,7 @@ declare class BitsoClient {
|
|
|
10
10
|
createReceivingAccount(user: User, bankAccount: BankAccount, bitsoBankAccountCode: string): Promise<string>;
|
|
11
11
|
createWithdraw(bitsoReceivingAccountId: string, amount: number, concept: string, rfc?: string): Promise<string>;
|
|
12
12
|
createLimitOrder(asset: string, amount: number, price: number, side: "buy" | "sell"): Promise<{
|
|
13
|
-
|
|
14
|
-
oid?: string;
|
|
13
|
+
oid: string;
|
|
15
14
|
}>;
|
|
16
15
|
getOrder(oid: string): Promise<{
|
|
17
16
|
book: string;
|
|
@@ -105,6 +105,7 @@ class BitsoClient {
|
|
|
105
105
|
}
|
|
106
106
|
createLimitOrder(asset, amount, price, side) {
|
|
107
107
|
return __awaiter(this, void 0, void 0, function* () {
|
|
108
|
+
const major = amount / price;
|
|
108
109
|
const requestConfig = {
|
|
109
110
|
method: "POST",
|
|
110
111
|
url: `${this.baseUrl}/api/v3/orders`,
|
|
@@ -113,7 +114,7 @@ class BitsoClient {
|
|
|
113
114
|
},
|
|
114
115
|
data: {
|
|
115
116
|
book: `${asset}_mxn`,
|
|
116
|
-
|
|
117
|
+
major: major.toString(),
|
|
117
118
|
price: price.toString(),
|
|
118
119
|
side,
|
|
119
120
|
time_in_force: "fillorkill",
|