@dydxprotocol/v3-client
Advanced tools
Comparing version 0.0.4 to 0.0.5
@@ -24,3 +24,3 @@ import { KeyPair, OrderSide, OrderType, Asset } from '@dydxprotocol/starkex-lib'; | ||
}): Promise<{}>; | ||
getOrders(params: { | ||
getOrders(params?: { | ||
market?: Market; | ||
@@ -32,10 +32,8 @@ status?: OrderStatus; | ||
createdBeforeOrAt?: ISO8601; | ||
}): Promise<{}>; | ||
}): Promise<{}[]>; | ||
getOrderById(orderId: string): Promise<{}>; | ||
getOrderByClientId(clientId: string): Promise<{}>; | ||
createOrder(params: PartialBy<ApiOrder, 'clientId' | 'signature'>, positionId: string, ethereumAddress: string): Promise<{}>; | ||
deleteOrder(orderId: string): Promise<{}>; | ||
deleteAllOrders(params: { | ||
market?: Market; | ||
}): Promise<{}>; | ||
cancelOrder(orderId: string): Promise<{}>; | ||
cancelAllOrders(market?: Market): Promise<{}>; | ||
getFills(params: { | ||
@@ -42,0 +40,0 @@ market?: Market; |
@@ -73,3 +73,3 @@ "use strict"; | ||
} | ||
async getOrders(params) { | ||
async getOrders(params = {}) { | ||
return this.get(this.generateQueryPath('orders', params)); | ||
@@ -112,6 +112,7 @@ } | ||
} | ||
async deleteOrder(orderId) { | ||
async cancelOrder(orderId) { | ||
return this.delete(`orders/${orderId}`); | ||
} | ||
async deleteAllOrders(params) { | ||
async cancelAllOrders(market) { | ||
const params = market ? { market } : {}; | ||
return this.delete(this.generateQueryPath('orders', params)); | ||
@@ -183,2 +184,2 @@ } | ||
exports.default = Private; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW1wbC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uLy4uLy4uL3NyYy9tb2R1bGVzL3ByaXZhdGUvaW1wbC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBLHlEQUF5RDtBQUN6RCwyREFVbUM7QUFFbkMsMkNBR3lCO0FBQ3pCLHF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SUFBSSxFQUFFLENBQUMsQ0FBQyxDQUFDLEVBQUUsQ0FDNUIsQ0FBQyxJQUFJLENBQUMsR0FBRyxDQUFDLENBQUM7UUFDWixPQUFPLEdBQUcsR0FBRyxJQUFJLFlBQVksRUFBRSxDQUFDO0lBQ2xDLENBQUM7Q0FDRjtBQXZURCwwQkF1VEMifQ== |
@@ -1,14 +0,6 @@ | ||
import { OrderSide, PerpetualMarket } from '@dydxprotocol/starkex-lib'; | ||
export { OrderSide } from '@dydxprotocol/starkex-lib'; | ||
import { Asset, OrderSide, PerpetualMarket } from '@dydxprotocol/starkex-lib'; | ||
export { Asset, OrderSide } from '@dydxprotocol/starkex-lib'; | ||
export declare type ISO8601 = string; | ||
export declare type Market = PerpetualMarket; | ||
export declare const Market: typeof PerpetualMarket; | ||
export declare enum Asset { | ||
ETH = "ETH", | ||
LINK = "LINK", | ||
BTC = "BTC", | ||
USDC = "USDC", | ||
USDT = "USDT", | ||
USD = "USD" | ||
} | ||
export declare enum MarketStatisticDay { | ||
@@ -15,0 +7,0 @@ ONE = "1", |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.AccountAction = exports.OrderStatus = exports.PositionStatus = exports.TimeInForce = exports.OrderType = exports.MarketStatisticDay = exports.Asset = exports.Market = exports.OrderSide = void 0; | ||
exports.AccountAction = exports.OrderStatus = exports.PositionStatus = exports.TimeInForce = exports.OrderType = exports.MarketStatisticDay = exports.Market = exports.OrderSide = exports.Asset = void 0; | ||
const starkex_lib_1 = require("@dydxprotocol/starkex-lib"); | ||
var starkex_lib_2 = require("@dydxprotocol/starkex-lib"); | ||
Object.defineProperty(exports, "Asset", { enumerable: true, get: function () { return starkex_lib_2.Asset; } }); | ||
Object.defineProperty(exports, "OrderSide", { enumerable: true, get: function () { return starkex_lib_2.OrderSide; } }); | ||
exports.Market = starkex_lib_1.PerpetualMarket; | ||
var Asset; | ||
(function (Asset) { | ||
Asset["ETH"] = "ETH"; | ||
Asset["LINK"] = "LINK"; | ||
Asset["BTC"] = "BTC"; | ||
Asset["USDC"] = "USDC"; | ||
Asset["USDT"] = "USDT"; | ||
Asset["USD"] = "USD"; | ||
})(Asset = exports.Asset || (exports.Asset = {})); | ||
var MarketStatisticDay; | ||
@@ -55,2 +47,2 @@ (function (MarketStatisticDay) { | ||
})(AccountAction = exports.AccountAction || (exports.AccountAction = {})); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidHlwZXMuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi9zcmMvdHlwZXMudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7O0FBQUEsMkRBR21DO0FBRW5DLHlEQUFzRDtBQUE3Qyx3R0FBQSxTQUFTLE9BQUE7QUFPTCxRQUFBLE1BQU0sR0FBRyw2QkFBZSxDQUFDO0FBRXRDLElBQVksS0FPWDtBQVBELFdBQVksS0FBSztJQUNmLG9CQUFXLENBQUE7SUFDWCxzQkFBYSxDQUFBO0lBQ2Isb0JBQVcsQ0FBQTtJQUNYLHNCQUFhLENBQUE7SUFDYixzQkFBYSxDQUFBO0lBQ2Isb0JBQVcsQ0FBQTtBQUNiLENBQUMsRUFQVyxLQUFLLEdBQUwsYUFBSyxLQUFMLGFBQUssUUFPaEI7QUFFRCxJQUFZLGtCQUlYO0FBSkQsV0FBWSxrQkFBa0I7SUFDNUIsK0JBQVMsQ0FBQTtJQUNULGlDQUFXLENBQUE7SUFDWCxtQ0FBYSxDQUFBO0FBQ2YsQ0FBQyxFQUpXLGtCQUFrQixHQUFsQiwwQkFBa0IsS0FBbEIsMEJBQWtCLFFBSTdCO0FBRUQsSUFBWSxTQUtYO0FBTEQsV0FBWSxTQUFTO0lBQ25CLDRCQUFlLENBQUE7SUFDZiwwQkFBYSxDQUFBO0lBQ2IsNENBQStCLENBQUE7SUFDL0Isd0NBQTJCLENBQUE7QUFDN0IsQ0FBQyxFQUxXLFNBQVMsR0FBVCx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eUIsQ0FBQTtBQUMzQixDQUFDLEVBSFcsYUFBYSxHQUFiLHFCQUFhLEtBQWIscUJBQWEsUUFHeEIifQ== |
{ | ||
"name": "@dydxprotocol/v3-client", | ||
"version": "0.0.4", | ||
"version": "0.0.5", | ||
"description": "Trading client library for the new dYdX system (v3 API)", | ||
@@ -5,0 +5,0 @@ "main": "build/src/index.js", |
@@ -160,7 +160,7 @@ /* eslint-disable @typescript-eslint/no-empty-function */ | ||
createdBeforeOrAt?: ISO8601, | ||
}, | ||
): Promise<{}> { | ||
} = {}, | ||
): Promise<{}[]> { | ||
return this.get( | ||
this.generateQueryPath('orders', params), | ||
); | ||
) as unknown as {}[]; | ||
} | ||
@@ -220,3 +220,3 @@ | ||
async deleteOrder(orderId: string): Promise<{}> { | ||
async cancelOrder(orderId: string): Promise<{}> { | ||
return this.delete( | ||
@@ -227,3 +227,4 @@ `orders/${orderId}`, | ||
async deleteAllOrders(params: { market?: Market }): Promise<{}> { | ||
async cancelAllOrders(market?: Market): Promise<{}> { | ||
const params = market ? { market } : {}; | ||
return this.delete( | ||
@@ -230,0 +231,0 @@ this.generateQueryPath('orders', params), |
import { | ||
Asset, | ||
OrderSide, | ||
@@ -6,3 +7,3 @@ PerpetualMarket, | ||
export { OrderSide } from '@dydxprotocol/starkex-lib'; | ||
export { Asset, OrderSide } from '@dydxprotocol/starkex-lib'; | ||
@@ -16,11 +17,2 @@ export type ISO8601 = string; | ||
export enum Asset { | ||
ETH = 'ETH', | ||
LINK = 'LINK', | ||
BTC = 'BTC', | ||
USDC = 'USDC', | ||
USDT = 'USDT', | ||
USD = 'USD', | ||
} | ||
export enum MarketStatisticDay { | ||
@@ -27,0 +19,0 @@ ONE = '1', |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
81518
1757