Poloniex API Guide

By CryptoAffiliate.io

Updated

We independently evaluate all recommended products and services. If you click on links we provide, we may receive compensation.

â–”

Poloniex is a popular cryptocurrency exchange that provides both HTTP and websocket APIs for interacting with the platform. These APIs allow users to access public market data and private read access to their accounts. The Poloniex API is an essential tool for traders who want to automate their trading strategies, track their portfolio, and access real-time market data.

Setting up the Poloniex API is a straightforward process that involves generating API keys and setting up permissions for read and write access. The API supports both REST and websocket protocols, and users can choose the one that best suits their needs. The REST API is ideal for users who want to perform simple tasks such as checking their account balance or placing an order, while the websocket API is more suitable for users who need real-time market data.

Key Takeaways

  • The Poloniex API allows users to access real-time market data and automate their trading strategies.
  • Setting up the API involves generating API keys and setting up permissions for read and write access.
  • The API supports both REST and websocket protocols, and users can choose the one that best suits their needs.

Setting Up Poloniex API

To start using Poloniex API, users need to set up their API key and secret key. This unique API key is required to authenticate and authorize API requests. The following steps will guide users on how to create an API/Secret Key Set:

  1. Log in to your Poloniex account and navigate to the settings tab.
  2. Click on the API Keys subtab within the profile tab.
  3. Click on the “Create New Key” button to generate a new API key.
  4. Users can specify the permissions for the API key by selecting the appropriate checkboxes. It is recommended to only enable the permissions required for the intended use of the API.
  5. Click on the “Create Key” button to generate the API key and secret key.
  6. Users should copy and save the API key and secret key in a secure location as they will not be displayed again.

It is important to note that Poloniex does not assist with API set up. Users can refer to the API Frequently Asked Questions (FAQs) or the Poloniex API Reference for further guidance.

Users should also take necessary precautions to secure their API keys to prevent unauthorized access to their accounts. It is recommended to only use API keys with trusted third-party applications and to regularly monitor API activity.

In summary, setting up an API key and secret key is a necessary step to use Poloniex API. Users should carefully follow the steps provided and take necessary precautions to secure their API keys.

Public Vs Private API

Poloniex offers two methods of use for the API: Public API and Private API. These connection methods are different but function in tandem with one another when required.

Public API

The Public API is a connection method used to gather publicly available information. Examples of publicly available information would be ticker information and 24-hour volume. This data is accessible to anyone, and users can retrieve it without authentication.

The Public API is useful for users who want to access market data without the need for authentication. This data is often used for research and analysis purposes. Public API endpoints are rate-limited to prevent abuse of the system.

Private API

The Private API is a connection method used to access private read and write data. Access to the Private API requires authentication using an API key and secret.

The Private API provides access to data such as account balances, order books, and trade history. This data is specific to the user and requires authentication to access.

The Private API is useful for users who want to automate their trading strategies or build custom trading bots. It allows users to access their account data programmatically and execute trades automatically.

Public vs Private API Comparison

FeaturePublic APIPrivate API
AuthenticationNot RequiredRequired
Access to Public Market DataYesNo
Access to Private Account DataNoYes
Ability to Execute TradesNoYes
Rate LimitsYesYes

Conclusion

In summary, Poloniex offers two methods of use for the API: Public API and Private API. The Public API is used to gather publicly available information, while the Private API is used to access private read and write data. The Private API requires authentication using an API key and secret, whereas the Public API does not. The Private API is useful for users who want to automate their trading strategies or build custom trading bots.

Using the REST API

Poloniex offers a comprehensive REST API that allows users to interact with their account programmatically. The REST API enables users to retrieve market data, place orders, and manage their account. To use the REST API, users must authenticate themselves with an API key and secret.

The REST API supports various HTTP methods, including GET, POST, PUT, and DELETE. Users can use the POST method to place orders, while the GET method can be used to retrieve market data. The REST API also supports a range of order types, including limit orders, stop-limit orders, and fill-or-kill orders.

To use the REST API, users must first create an API key and secret on the Poloniex website. Once the API key and secret are generated, users can use them to sign their requests. The API key and secret must be kept secure and not shared with anyone.

To place an order using the REST API, users must send a POST request to the appropriate endpoint. The request must include the required parameters, such as the currency pair, order type, and order size. Once the request is sent, the REST API will return a response containing information about the order, such as the order ID and status.

Poloniex provides detailed documentation on their REST API, including examples of how to use it. The documentation includes information on how to authenticate requests, the available endpoints, and the required parameters for each endpoint.

Users can also use third-party libraries and SDKs to interact with the Poloniex REST API. Poloniex offers SDKs in various programming languages, including Python, Java, and PHP. These SDKs make it easier for developers to integrate the Poloniex REST API into their applications.

Overall, the Poloniex REST API is a powerful tool for users who want to interact with their account programmatically. By using the REST API, users can automate their trading strategies, retrieve market data, and manage their account with ease.

ProsCons
Provides a comprehensive set of endpointsLimited to authenticated users
Supports a range of order typesRequires API key and secret
Offers detailed documentationRequires programming knowledge
Can be integrated with third-party libraries and SDKsMay require additional development time

Python and Poloniex API

Poloniex provides both HTTP and WebSocket APIs for interacting with the exchange. The APIs allow read access to public market data and private read access to the user’s account. The APIs also enable customers to trade programmatically using their own custom software.

Python is a popular programming language for cryptocurrency trading, and Poloniex offers a Python API wrapper for its API. The Poloniex Python API wrapper is a library that simplifies the process of making API requests to the Poloniex exchange. The library provides a set of functions that can be called from Python code to interact with the Poloniex API.

The Poloniex Python API wrapper supports both the HTTP and WebSocket APIs. The library is compatible with Python 2.7 and 3.5+. The package can be installed using pip, and the library’s documentation can be accessed by calling the Python help function with a Poloniex object as a parameter.

Here are some of the features of the Poloniex Python API wrapper:

  • WebSocket API support
  • Minimal amount of dependencies
  • Internal checks to reduce external API errors
  • Rate limiter to keep from going over call limits
  • Retries failed API calls during connection issues

The Poloniex Python API wrapper provides a simple interface for accessing the Poloniex API. Customers can use the wrapper to retrieve market data, execute trades, and manage their accounts programmatically.

Creating a Poloniex Futures API key is required before getting started with the Poloniex API. Poloniex also offers a Futures API Starter Kit containing a sample SDK and sample trading strategies to enable customers to get started quickly with API trading.

FeatureDescription
WebSocket API supportThe Poloniex Python API wrapper supports WebSocket API, which allows for real-time data streaming.
Minimal dependenciesThe Poloniex Python API wrapper has minimal dependencies, making it easy to install and use.
Internal checksThe library has internal checks to reduce external API errors, which helps to ensure that the program runs smoothly.
Rate limiterThe rate limiter helps to keep API calls within the allowed limits and prevents the program from being blocked.
Retry failed API callsThe library automatically retries failed API calls during connection issues, which helps to ensure that the program runs smoothly.

In conclusion, the Poloniex Python API wrapper is an excellent tool for customers who want to interact with the Poloniex exchange programmatically. The library is easy to use and provides a simple interface for accessing the Poloniex API.

Trading on Poloniex

Poloniex offers a variety of trading options for its users, including spot, margin, and futures markets. Trading on Poloniex involves buying and selling cryptocurrencies, with users having the ability to place limit orders, market orders, and stop-limit orders.

To place a buy or sell order, users can simply navigate to the trading page and select the cryptocurrency they wish to trade. From there, they can input the amount they wish to buy or sell and select the order type they prefer. It is important to note that users should always double-check their order details before submitting, as orders cannot be canceled or modified once they have been executed.

Poloniex also offers margin trading, which allows users to borrow funds to increase their buying power. Margin trading involves a significant amount of risk and should only be used by experienced traders who understand the risks involved.

For users who prefer to trade futures, Poloniex offers a futures market with a variety of trading pairs. Users can place both long and short positions, and can use leverage to increase their potential profits (or losses).

It is important for users to have a solid understanding of trading concepts such as order types, order books, and candlestick charts before trading on Poloniex. Additionally, users should always be aware of the risks involved in trading cryptocurrencies and should never invest more than they can afford to lose.

Overall, Poloniex offers a robust trading platform with a variety of options for users to choose from. Whether you are a beginner or an experienced trader, there is something for everyone on Poloniex.

Understanding API Rate Limits

Poloniex API has rate limits in place to ensure that the exchange’s services are not overused, which can lead to slow performance or even system crashes. These rate limits vary depending on the type of endpoint and the user’s account type. The exchange provides both HTTP and WebSocket APIs, and the rate limit strategy for each type of API endpoint differs.

Private Endpoints

Private endpoints are endpoints that require authentication with the user’s API key and secret. These endpoints allow users to access and manage their account information, including balances, orders, and trades. The rate limit strategy for private endpoints is based on the user’s account type.

Poloniex has three account types:

  • Regular
  • Verified
  • VIP

The higher the account type, the higher the rate limit. For example, the rate limit for a regular account is 6 requests per second, while the rate limit for a VIP account is 30 requests per second.

Public Endpoints

Public endpoints are endpoints that do not require authentication. These endpoints allow users to access public market data, such as ticker information, order book data, and trade history. The rate limit strategy for public endpoints is based on the user’s IP address.

The rate limit for public endpoints is 6 requests per second per IP address. If the rate limit is exceeded, the system will restrict the user’s use of their IP address and account for one minute.

Rate Limit Comparison Table

Endpoint TypeAccount TypeRate Limit
PrivateRegular6 requests per second
PrivateVerified10 requests per second
PrivateVIP30 requests per second
PublicAll6 requests per second per IP address

It is important to note that when an API has a specific rate limit, users should refer to that specific limit. If the rate limit is exceeded multiple times, the system may restrict the user’s use of their IP address and account for a longer period.

In conclusion, understanding Poloniex API rate limits is crucial for building efficient and reliable trading bots. Users should always ensure that their requests comply with the rate limit strategy for each endpoint and account type.

Security Measures

Poloniex takes security very seriously and provides various measures to protect its users’ accounts. Here are some of the security measures implemented by Poloniex:

Two-Factor Authorization

Poloniex offers two-factor authentication (2FA) for added security. Users can enable 2FA by downloading the Google Authenticator app or by using a YubiKey. Once enabled, users will be required to enter a unique code generated by the app or YubiKey every time they log in to their account. This added layer of security makes it harder for hackers to gain access to users’ accounts.

Email Confirmation

Poloniex requires email confirmation for certain actions, such as withdrawals and API key creation. When a user initiates one of these actions, an email will be sent to their registered email address. The user must then confirm the action by clicking a link in the email. This helps prevent unauthorized withdrawals or API key creation.

IP Access Restriction

Poloniex allows users to restrict API key access to specific IP addresses. This means that even if a hacker gains access to a user’s API key, they will not be able to use it unless they are accessing it from an approved IP address. Users can add and remove IP addresses from their API key settings at any time.

Table

Security MeasureDescription
Two-Factor AuthorizationRequires users to enter a unique code generated by an app or YubiKey
Email ConfirmationRequires users to confirm certain actions via email
IP Access RestrictionAllows users to restrict API key access to specific IP addresses

Overall, Poloniex provides various security measures to protect its users’ accounts. By enabling 2FA, confirming actions via email, and restricting API key access to specific IP addresses, users can help ensure the safety of their accounts.

Managing API Keys

Poloniex allows users to create API keys to access their accounts programmatically. This feature is especially useful for traders who want to automate their trading strategies or developers who want to build applications on top of the Poloniex platform.

To create an API key, users must navigate to the API Keys subtab within the profile tab and follow the instructions provided. It is important to note that Poloniex does not assist with API set up, but users can refer to the API documentation for information on how to use their API keys.

Once an API key is created, users can manage their keys by navigating to the API Keys subtab. From here, users can view their keys, enable or disable them, and delete them if necessary. It is important to keep API keys secure and only enable them for the necessary permissions required for the application or strategy being used.

Poloniex also offers API key security features to help protect user accounts. Users can configure trusted IP addresses for their API keys, which will only allow requests from those specific addresses. This feature is especially useful for bots, which can use the IP address of the bot as the trusted IP address.

To delete an API key, users can simply click the delete button next to the key they want to remove. It is important to note that once an API key is deleted, it cannot be recovered, and users will need to create a new key if they want to continue using the API.

In summary, managing API keys on Poloniex is a straightforward process. Users can create, enable, disable, and delete keys as necessary, and configure security features to protect their accounts. It is important to keep API keys secure and only enable them for the necessary permissions required for the application or strategy being used.

Poloniex Futures and Margin Trading

Poloniex offers Futures and Margin Trading to its users. Futures trading allows users to trade contracts that represent the value of an underlying asset at a future date. Margin trading, on the other hand, allows users to borrow funds to increase their buying power, enabling them to take larger positions in the market.

Poloniex Futures offers up to 100x leverage on Bitcoin Futures and up to 50x leverage on other Futures contracts. Users can choose between perpetual and fixed expiry contracts. Perpetual contracts have no set expiry date, while fixed expiry contracts have a set expiry date.

Margin Trading on Poloniex is available for a wide range of cryptocurrencies and trading pairs. The maximum leverage varies depending on the trading pair, with some pairs offering up to 5x leverage.

Poloniex also offers a Market Maker program for users who are interested in providing liquidity to the market. Market Makers earn rebates on trading fees for providing liquidity to the order book.

EntityDetails
Poloniex FuturesOffers up to 100x leverage on Bitcoin Futures and up to 50x leverage on other Futures contracts. Users can choose between perpetual and fixed expiry contracts.
Margin TradingAvailable for a wide range of cryptocurrencies and trading pairs. The maximum leverage varies depending on the trading pair, with some pairs offering up to 5x leverage.
Market MakerProvides liquidity to the order book and earns rebates on trading fees.

In conclusion, Poloniex offers Futures and Margin Trading for users who are interested in trading with leverage. The platform also provides a Market Maker program for users who want to provide liquidity to the market.

Understanding Orders

Poloniex API allows users to place and manage orders programmatically. Understanding how orders work is crucial for anyone who wants to trade on Poloniex using the API. This section provides an overview of the different types of orders and how they work on Poloniex.

Open Orders

Open orders refer to orders that have been placed but have not yet been filled or canceled. Poloniex API allows users to retrieve their open orders using the returnOpenOrders API endpoint. The response from this endpoint includes information such as the order number, currency pair, order type (buy or sell), order rate, order amount, and the time the order was placed.

Trade History

Trade history refers to a list of all the trades that a user has executed on Poloniex. Poloniex API allows users to retrieve their trade history using the returnTradeHistory API endpoint. The response from this endpoint includes information such as the trade ID, currency pair, order type (buy or sell), order rate, order amount, trade amount, trade fee, and the time the trade was executed.

Post-only Order

A post-only order is an order that is only added to the order book if it does not immediately match with an existing order. Poloniex API allows users to place post-only orders using the postOnly parameter. If the postOnly parameter is set to true, the order will only be added to the order book if it does not immediately match with an existing order. If the postOnly parameter is set to false, the order will be added to the order book regardless of whether it immediately matches with an existing order.

Order Types

Order TypeDescription
Limit OrderAn order to buy or sell at a specified price or better
Market OrderAn order to buy or sell at the best available price
Stop Limit OrderAn order to buy or sell at a specified price after a given stop price has been reached
Stop Market OrderAn order to buy or sell at the best available price after a given stop price has been reached

In summary, Poloniex API provides users with the ability to place and manage orders programmatically. Users can retrieve their open orders and trade history using the appropriate API endpoints. Additionally, users can place post-only orders to ensure that their orders are only added to the order book if they do not immediately match with an existing order.

Advanced Topics

Poloniex’s API offers advanced features that can help traders optimize their trading strategies. In this section, we will discuss some of the advanced topics related to the Poloniex API.

Websocket Feeds

Websocket feeds are a powerful tool for traders who want to receive real-time market data. Poloniex’s websocket API provides access to public market data and private read access to user accounts. The API allows users to subscribe to channels such as ticker, order book, and trades. By subscribing to these channels, traders can receive real-time updates on market activity and make informed trading decisions.

Trading Strategies

Poloniex’s API can be used to implement a wide range of trading strategies. Traders can use the API to automate their trading by placing orders, monitoring market activity, and executing trades. Some popular trading strategies include:

  • Arbitrage trading: This strategy involves taking advantage of price differences between different exchanges.
  • Market making: This strategy involves placing limit orders on both sides of the order book to provide liquidity to the market.
  • Momentum trading: This strategy involves buying or selling assets based on their recent price movements.

Traders can use the Poloniex API to implement these strategies and more.

SDK

Poloniex offers an SDK (Software Development Kit) that allows developers to build custom trading applications. The SDK provides access to the full range of Poloniex’s API features, including trading, market data, and account management. Developers can use the SDK to build trading bots, custom trading interfaces, and more.

SDK FeaturesDescription
TradingAllows users to place orders and execute trades
Market DataProvides access to real-time market data
Account ManagementAllows users to manage their Poloniex accounts
AuthenticationProvides secure authentication for API requests

In conclusion, the Poloniex API offers advanced features that can help traders optimize their trading strategies. By using websocket feeds, implementing trading strategies, and leveraging the SDK, traders can gain a competitive edge in the market.

Third-Party Applications and Services

The Poloniex API allows users to connect to third-party applications and services, providing a range of benefits and opportunities for traders. These applications and services include trading bots, asset tracking, portfolio management, trade analysis, tax applications related to cryptocurrencies, and lending applications.

One notable partnership that leverages the Poloniex API is with CCXT, a popular open-source cryptocurrency trading library. Poloniex API CCXT partnership allows users to access Poloniex’s trading features through the CCXT library, enabling developers to build trading bots and other applications that can connect to Poloniex.

In addition to CCXT, there are many other third-party services and applications that can be used with the Poloniex API. Some of the most popular ones include:

  • CoinTracking: A portfolio management and tax reporting tool that supports over 8,000 cryptocurrencies and exchanges, including Poloniex.
  • CryptoTrader.Tax: A tax reporting software that automatically calculates capital gains and losses from cryptocurrency trading on Poloniex and other exchanges.
  • HaasOnline: A trading bot platform that supports Poloniex and other exchanges, providing users with advanced trading strategies and automation tools.
  • Shrimpy: A portfolio management platform that allows users to automate their cryptocurrency trading and rebalancing strategies across multiple exchanges, including Poloniex.

Users can also create their own custom applications and services using the Poloniex API, leveraging the platform’s extensive trading features and data.

Overall, the Poloniex API provides users with a wide range of options for third-party integrations, enabling traders to take advantage of advanced trading strategies, portfolio management tools, and more.

Frequently Asked Questions

How do I get started with Poloniex API?

To get started with Poloniex API, one needs to create an API key and API secret. The API set up is not something that Poloniex assists with, but users can get started themselves by checking out the guide provided by Poloniex. The guide includes details on how to create an API/Secret Key Set.

What are the API endpoints available on Poloniex?

Poloniex provides several API endpoints that allow users to access different functionalities of the exchange. The endpoints include public endpoints, private endpoints, and WebSocket endpoints. The public endpoints provide access to public market data, while the private endpoints provide access to user account data. WebSocket endpoints provide real-time market data updates.

How can I authenticate my API requests on Poloniex?

To authenticate API requests on Poloniex, users need to include their API key and API secret in the request header. Poloniex uses HMAC-SHA512 signature to sign the request parameters. Users can refer to the API Key Security guide provided by Poloniex for more details on how to authenticate API requests.

What are the rate limits for Poloniex API?

Poloniex has rate limits on API requests to prevent abuse and ensure the stability of the exchange. The rate limits vary depending on the API endpoint and the user’s account level. Users can refer to the API Key Security guide provided by Poloniex for more details on rate limits.

What are the different types of orders available on Poloniex?

Poloniex provides several types of orders that users can place on the exchange. The order types include limit orders, stop-limit orders, trailing stop orders, fill-or-kill orders, immediate-or-cancel orders, and post-only orders. Each order type has its own unique characteristics and use cases.

How can I access historical data using Poloniex API?

Poloniex provides historical data for market charts and trade history. Users can access this data using the public API endpoints. The historical data is available in various time intervals, including 5 minutes, 15 minutes, 30 minutes, 2 hours, 4 hours, and 1 day. Users can refer to the API documentation provided by Poloniex for more details on accessing historical data.

TableExample
DataComparisons
N/AN/A

DISCLAIMER: The information contained in this website is for general information purposes only. The information is provided by CryptoAffiliate and while we endeavour to keep the information up to date and correct, we make no representations or warranties of any kind, express or implied, about the completeness, accuracy, reliability, suitability or availability with respect to the website or the information, products, services, or related graphics contained on the website for any purpose. Any reliance you place on such information is therefore strictly at your own risk.

AFFILIATE DISCLOSURE: Kindly be aware that several links on CryptoAffiliate.io function as affiliate links. Should you click on these links and proceed to make a purchase from any of our partners, we may earn a commission. This commission comes at no additional expense to you.

At CryptoAffiliate.io, our team exclusively suggests products and services that align with our own preferences and that, in our assessment, will bring benefits to our readers. We strongly encourage you to conduct your own research and exercise informed judgment when making financial choices.