Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

bybit-api

Package Overview
Dependencies
Maintainers
1
Versions
126
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bybit-api - npm Package Compare versions

Comparing version 3.3.0 to 3.3.1

lib/types/response/contract.d.ts

1

lib/constants/enum.d.ts

@@ -20,2 +20,3 @@ export declare const linearPositionModeEnum: {

readonly INCORRECT_API_KEY_PERMISSIONS: 10005;
readonly DB_ERROR_WRONG_CURSOR: 10016;
readonly INCORRECT_PRIVATE_OPERATIONS: 3303001;

@@ -22,0 +23,0 @@ /** Account not unified margin, update required */

@@ -23,2 +23,3 @@ "use strict";

INCORRECT_API_KEY_PERMISSIONS: 10005,
DB_ERROR_WRONG_CURSOR: 10016,
INCORRECT_PRIVATE_OPERATIONS: 3303001,

@@ -25,0 +26,0 @@ /** Account not unified margin, update required */

4

lib/contract-client.d.ts

@@ -1,2 +0,2 @@

import { APIResponseWithTime, APIResponseV3, UMCandlesRequest, UMCategory, UMFundingRateHistoryRequest, UMInstrumentInfoRequest, UMOpenInterestRequest, UMOptionDeliveryPriceRequest, UMPublicTradesRequest, ContractOrderRequest, ContractHistoricOrdersRequest, ContractCancelOrderRequest, ContractModifyOrderRequest, ContractActiveOrdersRequest, ContractPositionsRequest, ContractSetAutoAddMarginRequest, ContractSetMarginSwitchRequest, ContractSetPositionModeRequest, ContractSetTPSLRequest, ContractUserExecutionHistoryRequest, ContractClosedPNLRequest, ContractWalletFundRecordRequest } from './types';
import { APIResponseWithTime, APIResponseV3, UMCandlesRequest, UMCategory, UMFundingRateHistoryRequest, UMInstrumentInfoRequest, UMOpenInterestRequest, UMOptionDeliveryPriceRequest, UMPublicTradesRequest, ContractOrderRequest, ContractHistoricOrdersRequest, ContractCancelOrderRequest, ContractModifyOrderRequest, ContractActiveOrdersRequest, ContractPositionsRequest, ContractSetAutoAddMarginRequest, ContractSetMarginSwitchRequest, ContractSetPositionModeRequest, ContractSetTPSLRequest, ContractUserExecutionHistoryRequest, ContractClosedPNLRequest, ContractWalletFundRecordRequest, PaginatedResult, ContractHistoricOrder } from './types';
import BaseRestClient from './util/BaseRestClient';

@@ -51,3 +51,3 @@ /**

/** Query order history. As order creation/cancellation is asynchronous, the data returned from the interface may be delayed. To access order information in real-time, call getActiveOrders() */
getHistoricOrders(params: ContractHistoricOrdersRequest): Promise<APIResponseV3<any>>;
getHistoricOrders(params: ContractHistoricOrdersRequest): Promise<APIResponseV3<PaginatedResult<ContractHistoricOrder>>>;
/** Cancel order */

@@ -54,0 +54,0 @@ cancelOrder(params: ContractCancelOrderRequest): Promise<APIResponseV3<any>>;

@@ -197,3 +197,3 @@ "use strict";

getOpenInterestLimitInfo(symbol) {
return this.getPrivate('/contract/v3/private/position/closed-pnl', {
return this.getPrivate('/contract/v3/private/position/limit-info', {
symbol,

@@ -200,0 +200,0 @@ });

@@ -0,1 +1,2 @@

export * from './contract';
export * from './shared';

@@ -2,0 +3,0 @@ export * from './spot';

@@ -13,2 +13,3 @@ "use strict";

Object.defineProperty(exports, "__esModule", { value: true });
__exportStar(require("./contract"), exports);
__exportStar(require("./shared"), exports);

@@ -15,0 +16,0 @@ __exportStar(require("./spot"), exports);

@@ -112,2 +112,3 @@ "use strict";

if (method === 'GET') {
// const serialisedParams = signResult.serializedParams;
return Object.assign(Object.assign({}, options), { params: signResult.originalParams });

@@ -200,2 +201,3 @@ }

res.sign = yield node_support_1.signMessage(paramsStr, this.secret);
res.serializedParams = signRequestParams;
// console.log('sign req: ', paramsStr);

@@ -218,3 +220,4 @@ return res;

const sortProperties = true;
res.serializedParams = requestUtils_1.serializeParams(res.originalParams, strictParamValidation, sortProperties, encodeSerialisedValues);
const encodeValues = false;
res.serializedParams = requestUtils_1.serializeParams(res.originalParams, strictParamValidation, sortProperties, encodeValues);
res.sign = yield node_support_1.signMessage(res.serializedParams, this.secret);

@@ -221,0 +224,0 @@ res.paramsWithSign = Object.assign(Object.assign({}, res.originalParams), { sign: res.sign });

@@ -19,3 +19,3 @@ "use strict";

const value = encodeSerialisedValues
? encodeURI(params[key])
? encodeURIComponent(params[key])
: params[key];

@@ -22,0 +22,0 @@ if (strict_validation === true && typeof value === 'undefined') {

{
"name": "bybit-api",
"version": "3.3.0",
"version": "3.3.1",
"description": "Complete & robust node.js SDK for Bybit's REST APIs and WebSockets, with TypeScript & integration tests.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -320,1 +320,5 @@ # Node.js & Typescript Bybit API SDK

Contributions are encouraged, I will review any incoming pull requests. See the issues tab for todo items.
## Star History
[![Star History Chart](https://api.star-history.com/svg?repos=tiagosiebler/ftx-api,tiagosiebler/bybit-api,tiagosiebler/binance,tiagosiebler/orderbooks,tiagosiebler/okx-api,tiagosiebler/awesome-crypto-examples&type=Date)](https://star-history.com/#tiagosiebler/ftx-api&tiagosiebler/bybit-api&tiagosiebler/binance&tiagosiebler/orderbooks&tiagosiebler/okx-api&tiagosiebler/awesome-crypto-examples&Date)

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc