New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

bit_mex_api

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

bit_mex_api

REST_API_for_the_BitMEX_com_trading_platform_brbra_hrefapprestAPIREST_Documentationabra_hrefappwsAPIWebsocket_Documentationa

latest
npmnpm
Version
1.2.1
Version published
Weekly downloads
4
-20%
Maintainers
1
Weekly downloads
 
Created
Source

bit_mex_api

BitMexApi - JavaScript client for bit_mex_api REST API for the BitMEX.com trading platform.

<a href="/app/restAPI">REST Documentation
<a href="/app/wsAPI">Websocket Documentation This SDK is automatically generated by the Swagger Codegen project:

  • API version: 1.2.0
  • Package version: 1.2.0
  • Build date: 2016-07-05T09:40:50.068-05:00
  • Build package: class io.swagger.codegen.languages.JavascriptClientCodegen

Installation

For Node.js

npm

To publish the library as a npm, please follow the procedure in "Publishing npm packages".

Then install it via:

npm install bit_mex_api --save

git

If the library is hosted at a git repository, e.g. https://github.com/GIT_USER_ID/GIT_REPO_ID then install it via:

    npm install GIT_USER_ID/GIT_REPO_ID --save

For browser

The library also works in the browser environment via npm and browserify. After following the above steps with Node.js and installing browserify with npm install -g browserify, perform the following (assuming main.js is your entry file):

browserify main.js > bundle.js

Then include bundle.js in the HTML pages.

Getting Started

Please follow the installation instruction and execute the following JS code:

var BitMexApi = require('bit_mex_api');

var api = new BitMexApi.AnnouncementApi()

var opts = { 
  'columns': "columns_example" // {String} Array of column names to fetch. If omitted, will return all columns.
};

var callback = function(error, data, response) {
  if (error) {
    console.error(error);
  } else {
    console.log('API called successfully. Returned data: ' + data);
  }
};
api.announcementGet(opts, callback);

Documentation for API Endpoints

All URIs are relative to https://localhost/api/v1

ClassMethodHTTP requestDescription
BitMexApi.AnnouncementApiannouncementGetGET /announcementGet site announcements.
BitMexApi.AnnouncementApiannouncementGetUrgentGET /announcement/urgentGet urgent (banner) announcements.
BitMexApi.ApiKeyApiapiKeyDisablePOST /apiKey/disableDisable an API Key.
BitMexApi.ApiKeyApiapiKeyEnablePOST /apiKey/enableEnable an API Key.
BitMexApi.ApiKeyApiapiKeyGetGET /apiKeyGet your API Keys.
BitMexApi.ApiKeyApiapiKeyNewPOST /apiKeyCreate a new API Key.
BitMexApi.ApiKeyApiapiKeyRemoveDELETE /apiKeyRemove an API Key.
BitMexApi.ChatApichatGetGET /chatGet chat messages.
BitMexApi.ChatApichatGetConnectedGET /chat/connectedGet connected users.
BitMexApi.ChatApichatNewPOST /chatSend a chat message.
BitMexApi.ExecutionApiexecutionGetGET /executionGet all raw executions for your account.
BitMexApi.ExecutionApiexecutionGetTradeHistoryGET /execution/tradeHistoryGet all balance-affecting executions. This includes each trade, insurance charge, and settlement.
BitMexApi.FundingApifundingGetGET /fundingGet funding history.
BitMexApi.InstrumentApiinstrumentGetGET /instrumentGet instruments.
BitMexApi.InstrumentApiinstrumentGetActiveGET /instrument/activeGet all active instruments and instruments that have expired in <24hrs.
BitMexApi.InstrumentApiinstrumentGetActiveAndIndicesGET /instrument/activeAndIndicesHelper method. Gets all active instruments and all indices. This is a join of the result of /indices and /active.
BitMexApi.InstrumentApiinstrumentGetActiveIntervalsGET /instrument/activeIntervalsReturn all active contract series and interval pairs.
BitMexApi.InstrumentApiinstrumentGetIndicesGET /instrument/indicesGet all price indices.
BitMexApi.InsuranceApiinsuranceGetGET /insuranceGet insurance fund history.
BitMexApi.LeaderboardApileaderboardGetGET /leaderboardGet current leaderboard.
BitMexApi.LiquidationApiliquidationGetGET /liquidationGet liquidation orders.
BitMexApi.OrderApiorderAmendPUT /orderAmend the quantity or price of an open order.
BitMexApi.OrderApiorderAmendBulkPUT /order/bulkAmend multiple orders.
BitMexApi.OrderApiorderCancelDELETE /orderCancel order(s). Send multiple order IDs to cancel in bulk.
BitMexApi.OrderApiorderCancelAllDELETE /order/allCancels all of your orders.
BitMexApi.OrderApiorderCancelAllAfterPOST /order/cancelAllAfterAutomatically cancel all your orders after a specified timeout.
BitMexApi.OrderApiorderClosePositionPOST /order/closePositionClose a position. [Deprecated, use POST /order with execInst: 'Close']
BitMexApi.OrderApiorderGetOrdersGET /orderGet your orders.
BitMexApi.OrderApiorderNewPOST /orderCreate a new order.
BitMexApi.OrderApiorderNewBulkPOST /order/bulkCreate multiple new orders.
BitMexApi.OrderBookApiorderBookGetGET /orderBookGet current orderbook [deprecated, use /orderBook/L2].
BitMexApi.OrderBookApiorderBookGetL2GET /orderBook/L2Get current orderbook in vertical format.
BitMexApi.PositionApipositionGetGET /positionGet your positions.
BitMexApi.PositionApipositionIsolateMarginPOST /position/isolateEnable isolated margin or cross margin per-position.
BitMexApi.PositionApipositionTransferIsolatedMarginPOST /position/transferMarginTransfer equity in or out of a position.
BitMexApi.PositionApipositionUpdateLeveragePOST /position/leverageChoose leverage for a position.
BitMexApi.QuoteApiquoteGetGET /quoteGet Quotes.
BitMexApi.QuoteApiquoteGetBucketedGET /quote/bucketedGet previous quotes in time buckets.
BitMexApi.SchemaApischemaGetGET /schemaGet model schemata for data objects returned by this API.
BitMexApi.SchemaApischemaWebsocketHelpGET /schema/websocketHelpReturns help text & subject list for websocket usage.
BitMexApi.SettlementApisettlementGetGET /settlementGet settlement history.
BitMexApi.StatsApistatsGetGET /statsGet exchange-wide and per-series turnover and volume statistics.
BitMexApi.StatsApistatsHistoryGET /stats/historyGet historical exchange-wide and per-series turnover and volume statistics.
BitMexApi.TradeApitradeGetGET /tradeGet Trades.
BitMexApi.TradeApitradeGetBucketedGET /trade/bucketedGet previous trades in time buckets.
BitMexApi.UserApiuserCancelWithdrawalPOST /user/cancelWithdrawalCancel a withdrawal.
BitMexApi.UserApiuserCheckReferralCodeGET /user/checkReferralCodeCheck if a referral code is valid.
BitMexApi.UserApiuserConfirmEmailPOST /user/confirmEmailConfirm your email address with a token.
BitMexApi.UserApiuserConfirmEnableTFAPOST /user/confirmEnableTFAConfirm two-factor auth for this account. If using a Yubikey, simply send a token to this endpoint.
BitMexApi.UserApiuserConfirmPasswordResetPOST /user/confirmPasswordResetConfirm a password reset.
BitMexApi.UserApiuserConfirmWithdrawalPOST /user/confirmWithdrawalConfirm a withdrawal.
BitMexApi.UserApiuserDisableTFAPOST /user/disableTFADisable two-factor auth for this account.
BitMexApi.UserApiuserGetGET /userGet your user model.
BitMexApi.UserApiuserGetAffiliateStatusGET /user/affiliateStatusGet your current affiliate/referral status.
BitMexApi.UserApiuserGetCommissionGET /user/commissionGet your account's commission status.
BitMexApi.UserApiuserGetDepositAddressGET /user/depositAddressGet a deposit address.
BitMexApi.UserApiuserGetMarginGET /user/marginGet your account's margin status. Send a currency of &quot;all&quot; to receive an array of all supported currencies.
BitMexApi.UserApiuserGetWalletHistoryGET /user/walletHistoryGet a history of all of your wallet transactions (deposits and withdrawals).
BitMexApi.UserApiuserLoginPOST /user/loginLog in to BitMEX.
BitMexApi.UserApiuserLogoutPOST /user/logoutLog out of BitMEX.
BitMexApi.UserApiuserLogoutAllPOST /user/logoutAllLog all systems out of BitMEX. This will revoke all of your account's access tokens, logging you out on all devices.
BitMexApi.UserApiuserNewPOST /userRegister a new user.
BitMexApi.UserApiuserRequestEnableTFAPOST /user/requestEnableTFAGet Google Authenticator secret key for setting up two-factor auth. Fails if already enabled. Use /confirmEnableTFA for Yubikeys.
BitMexApi.UserApiuserRequestPasswordResetPOST /user/requestPasswordResetRequest a password reset.
BitMexApi.UserApiuserRequestWithdrawalPOST /user/requestWithdrawalRequest a withdrawal to an external wallet.
BitMexApi.UserApiuserSavePreferencesPOST /user/preferencesSave user preferences.
BitMexApi.UserApiuserSendVerificationEmailPOST /user/resendVerificationEmailRe-send verification email.
BitMexApi.UserApiuserUpdatePUT /userUpdate your password, name, and other attributes.

Documentation for Models

Documentation for Authorization

All endpoints do not require authorization.

FAQs

Package last updated on 14 Aug 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts