# Welcome

Welcome to the Abyiss API documentation!

## **Welcome to Abyiss API Documentation**

Thank you for choosing [Abyiss ](https://abyiss.com/)as your cryptocurrency API provider. This comprehensive documentation is designed to assist you in understanding our API functionality, supported endpoints, and API architecture. By following these guidelines, you'll be able to seamlessly integrate our powerful APIs into your applications and unlock the full potential of our on/off ramp as well as real-time and historical cryptocurrency data.

## Getting Started

To begin utilizing our APIs, you'll need an account and an API Key. Creating both is a quick and straightforward process, which [can be done on our website](https://abyiss.com/home). By obtaining your API Key, you'll gain access to a wide range of endpoints that cater to your specific requirements.

## **API Functionality and Endpoints**

Our API offers a rich set of functionalities that empower you to access an on/off ramp as well as real-time and historical cryptocurrency data effortlessly. The available endpoints have been meticulously designed and organized into sections for easy navigation. Each endpoint comes with comprehensive documentation, including request parameters, response formats, and example usage. We encourage you to explore these sections and leverage the full capabilities of our API to meet your unique needs.

## **Support**

We are committed to providing exceptional support to our valued users. Should you require any assistance or encounter any challenges during your integration process, we are here to help. You can reach out to our dedicated support team through our website at [Abyiss.com](https://abyiss.com/contact). Alternatively, you can also send us an email at <support@abyiss.com>, and our team will respond to your inquiries promptly.

We appreciate your trust in Abyiss as your cryptocurrency API provider. We are confident that our robust API infrastructure and reliable data sources will empower you to build exceptional applications and make informed decisions in the fast-paced world of cryptocurrencies.


# Getting Started

How to get started with the Abyiss API.

{% hint style="info" %}
**API access differs based on your plan**
{% endhint %}

## Getting Started with the Abyiss API

Welcome to the Abyiss API! This guide will walk you through the steps to get started and harness the power of our API, enabling you to connect to over 100+ cryptocurrency exchanges and access real-time data for more than 100,000+ cryptocurrencies.

## Step 1: Get Your API Keys

To begin using the Abyiss API, you'll need to [sign up for an account](https://abyiss.com/signin). Once you have an account, you can find your API Key in the [dashboard](https://abyiss.com/home). API keys are used for authentication in all your API requests. Requests without a valid API key will result in an error.

To learn more about Authentication and API Keys please reference the [API Keys - Authentication](/introduction/api-architecture/api-keys-authentication) section under [API Architecture](/introduction/api-architecture).

## Step 2: Explore Available Endpoints

Our API Endpoints are broken up into a few categories:

* [**Octane API**](/octane-api/introduction): Access on and off-ramp services for cryptocurrencies.
* [**Crypto API**](/crypto-api/introduction): Access real-time and historical data for over 100,000+ cryptocurrencies across 100+ centralized exchanges. Retrieve information such as market prices, trading volumes, and more.
* [**Blockchain API**](/blockchain-api/introduction): Interact with blockchain networks and retrieve data related to decentralized exchanges, blocks, tokens, liquidity pools, and more. Leverage this API category to build applications that require direct access to blockchain data.

You will need an [API Key](/introduction/api-architecture/api-keys-authentication) to access all of our endpoints.

## Step 3: Make Your First Request

To make your first request, just ping our API: <https://api.abyiss.com/ping>. This will return "Hello from the Abyiss". All requests return JSON-encoded responses.

## Ping Abyiss

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/ping`

Returns "Hello from the Abyiss"

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "ping": "Hello from the Abyiss"
}
```

{% endtab %}
{% endtabs %}

{% tabs %}
{% tab title="Make Your First Request" %}
**Example URL**

{% embed url="<https://api.abyiss.com/ping>" %}
Click me!
{% endembed %}

**Response Object**

```json
{
    "ping": "Hello from the Abyiss"
}
```

{% endtab %}
{% endtabs %}

## Step 4: Copy & Paste Code

Take a look at how you might call our API using the following programing languages.

Feel free to copy and paste this code into your own development environment and try it for yourself.

{% tabs %}
{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY"" 
client = Abyiss.Client(apiKey) 


exchanges = client.getExchanges()

exchangeDetails = client.getExchangeDetails("coinbasepro")

exchangeStatus = client.getExchangeStatus("coinbasepro")

exchangeMarkets = client.getExchangeMarkets("coinbasepro")

exchangeMarketDetails = client.getMarketDetails("coinbasepro", "BTC-USDT")

aggregates = client.aggregates("coinbasepro", "BTC-USDT", "1h", '300')

trades = client.trades("coinbasepro", "BTC-USDT", '300')

quotes = client.quotes("coinbasepro", "BTC-USDT")

orderbook = client.orderBook("coinbasepro", "BTC-USDT")
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
import { Abyiss } from 'abyiss'

const A = new Abyiss('YOUR API KEY')

async function showExchanges () {
  console.log(await A.exchanges())
}

async function aggregate () {
    console.log(await A.aggregates('coinbasepro', 'btc-usd', '1m', {limit: 2})) 
}

showExchanges()
aggregate()
```

{% endtab %}

{% tab title="Curl" %}

```shell
curl https://api.abyiss.com/ping
```

{% endtab %}
{% endtabs %}

## Step 5: Client Libraries

To simplify your integration process, we provide [Client Libraries](/introduction/client-libraries) in various programming languages. You can find our client libraries on GitHub. These libraries offer convenient methods and examples to help you interact with our API in your preferred programming language. Feel free to copy and paste the code examples into your development environment and try them out.

Currently, we support client libraries in the following programming languages:

{% embed url="<https://github.com/Abyiss/Client-python>" %}
Python Client
{% endembed %}

{% embed url="<https://github.com/Abyiss/Client-js>" %}
Javascript Client
{% endembed %}

{% embed url="<https://github.com/Abyiss/Client-http>" %}
HTTP Client
{% endembed %}

For more information about our client libraries, please refer to the GitHub documentation.

## Need support?

If you need any additional support please contact us on our website [Abyiss.com](https://abyiss.com/contact) or send us an email at <support@abyiss.com>. We are here to help.


# Reading Documentation

The art of reading documentation.

The goal of this section is to help jump start your journey with Abyiss. Below we go over some pro tips on how to better understand our documentation. For more tutorials head over to our [YouTube Channel](https://www.youtube.com/channel/UCDCouIru0ltR6s1kbSPTZhA) where we post quick-start videos.

If you are having trouble, check out the [Getting Started](/introduction/getting-started) section or [contact us](https://abyiss.com/contact). We are here to help!

* **Be patient**
* **Review terms**
* **Read slowly**
* **Reread things**
* **Click the drop down arrows**
* **Read the overviews**
* **Google anything you don't understand**
* **Contact us if you are having trouble**

{% embed url="<https://youtu.be/rx0QnhukJsg>" %}
Reading Documentation
{% endembed %}


# Client Libraries

Abyiss programming client libraries.

## Python

{% embed url="<https://github.com/Abyiss/Client-python>" %}
Python Library for Abyiss API
{% endembed %}

{% embed url="<https://pypi.org/project/Abyiss>" %}
PyPi Python Library for Abyiss API
{% endembed %}

## JavaScript

{% embed url="<https://github.com/Abyiss/Client-js>" %}
JavaScript Library for Abyiss API
{% endembed %}

{% embed url="<https://www.npmjs.com/package/abyiss>" %}
NPM JavaScript Library for Abyiss API&#x20;
{% endembed %}

## GoLang

{% embed url="<https://github.com/Abyiss/goAbyiss>" %}

## HTTP

{% embed url="<https://github.com/Abyiss/Client-http>" %}
HTTP Client for Abyiss API
{% endembed %}


# API Architecture

Abyiss API Architecture Documentation.

{% hint style="info" %}
**Abyiss API Architecture**
{% endhint %}

Learn more about the unique characteristics and core concepts behind our API.

You will need an account and API Key to access these endpoints. To create an account with Abyiss click [here ](https://abyiss.com/signin)and to learn more about API Keys and Authorization click [here](/introduction/api-architecture/api-keys-authentication).&#x20;

* [API Keys - Authentication](/introduction/api-architecture/api-keys-authentication)
* [API Server URL](/introduction/api-architecture/api-server-url)
* [Requests & Error Codes](/introduction/api-architecture/requests-and-error-codes)
* [Rate Limits](/introduction/api-architecture/rate-limits)


# API Keys - Authentication

Abyiss API Keys and Authentication.

## Generating an API Key

{% hint style="info" %}
**Generate an API Key** [**Here**](https://abyiss.com/dashboard)
{% endhint %}

Before being able to make any requests, you must sign up and create an API Key via [Abyiss.com](https://abyiss.com/dashboard). After signing up you will be redirected to your dashboard where you can find your API Key.

The API Key will be randomly generated and provided by Abyiss. Sign up for free [here](https://abyiss.com/signup).

## API Key Permissions

Once you receive your API Key, you have access to most of the API endpoints. You are subject to our [rate limits](/introduction/api-architecture/rate-limits).

You will need to be KYC-verified when using the octane [POST transactions](/octane-api/apis/transactions) endpoint. If you are not KYC-verified, you will receive a 403 Forbidden error.

## Passing Your API Key

{% hint style="warning" %}
**You can pass your API Key in the URL Query, Header, or Body of a Request**
{% endhint %}

We recommend passing your API Key within the header of the request, as it provides more security. The Abyiss Client Libraries automatically pass API Keys in the header of every request.

Below is an example of how to pass your API Key in the URL Query:

[`https://api.abyiss.com/v2/cex/exchanges?apiKey=YOUR_API_KEY`](https://api.abyiss.com/v2/cex/exchanges?apiKey=YOUR_API_KEY)

Below is an example of how to pass your API Key in the Header of a Curl Request:

```url
curl -H "api-key: API KEY" https://api.abyiss.com/v2/cex/exchanges
```

Below is an example of how to pass your API Key in the Body of a Curl Request:

```url
curl -X POST -H "Content-Type: application/json" -d '{"apiKey": "API KEY"}' https://api.abyiss.com/v2/cex/exchanges
```


# API Server URL

Abyiss API Server URL.

{% hint style="info" %}
**API Server URL: `https://api.abyiss.com`**
{% endhint %}

The Abyiss API runs at [`https://api.abyiss.com`](https://api.abyiss.com) All requests should be prefixed by the server URL.&#x20;


# Requests & Error Codes

Abyiss API requests and error codes.

All requests and responses are `application/json` content type and follow typical HTTP response status codes for success and failure.&#x20;

## Errors

```json
{
   "message": "Exchange Not Found"
}
```

Unless otherwise stated, errors to bad requests will respond with HTTP 4xx or status codes. The body will also contain a `message` parameter indicating the cause. Your language's http library should be configured to provide message bodies for non-2xx requests so that you can read the message field from the body.

## Success

A successful response is indicated by HTTP status code 200 and may contain an optional body. If the response has a body it will be documented.

## Common Error Codes

<table><thead><tr><th width="297">Status Code</th><th>Reason</th></tr></thead><tbody><tr><td>400</td><td>Bad Request - Invalid request format</td></tr><tr><td>401</td><td>Unauthorized -- Invalid API Key</td></tr><tr><td>402</td><td>Maximum API Query Limit</td></tr><tr><td>403</td><td>Forbidden -- You do not have access to the requested resource</td></tr><tr><td>404</td><td>Not Found</td></tr><tr><td>405</td><td>Exchange Data Unavailable</td></tr><tr><td>500</td><td>Internal Server Error -- We had a problem with our server</td></tr></tbody></table>


# Rate Limits

How rate limits work with the Abyiss API.

## Rate Limit for REST API

The Abyiss REST API enforces rate limits to ensure fair usage and maintain system performance. When a rate limit is exceeded, a response with a status of **`429 Too Many Requests`** will be returned.

By default, all API endpoints are throttled based on the requesting IP address. The general rate limit is set to 10 requests per second, with the ability to handle bursts of up to 15 requests per second. Please note that certain endpoints may have custom rate limits depending on their specific usage and requirements.

## Higher Rate Limits

If you require a higher rate limit for your application or have specific business needs, we offer custom rate limit options. To discuss a higher rate limit tailored to your requirements, please contact our team at [**support@abyiss.com**](<mailto:support@abyiss.com >). They will be happy to assist you with your request.

## How It Works

Our rate limiting uses a lazy-fill token bucket implementation. A TokenBucket stores a maximum amount of tokens which is the burst size and fills at a given rate called the refresh rate. The bucket will start full and as requests are received a token is removed for each request. Tokens are continuously added to the bucket at the refresh rate until full.

When a user sends a request, here's how TokenBucket calculates whether or not to rate limit the user:

1. Fill the user's TokenBucket to a token size based on the following formula:\
   `token_amount = min(burst, previous_token_amount + (current_time - previous_request_time) * refresh_rate)`
2. Remove 1 token if possible, otherwise rate limit the request.
3. Repeat Steps 1 and 2 for each subsequent request.

## Example

Let's say you have a TokenBucket with burst = 3 and refresh\_rate = 1. The table below represents the state of your token bucket after a series of requests

<table><thead><tr><th width="150">Action</th><th width="150">Time</th><th width="150">Tokens</th><th>Notes</th></tr></thead><tbody><tr><td>Initial State</td><td>0.0</td><td>3.0</td><td>New TokenBucket is initialized to max capacity (burst)</td></tr><tr><td>Request 1</td><td>0.5</td><td>2.0</td><td>First fill the TokenBucket, then remove a token. Because we are at max capacity, just subtract 1 token from 3</td></tr><tr><td>Request 2</td><td>0.8</td><td>1.3</td><td>Fill the TokenBucket to 2.3 (min(3, (2 + (.8 - .5) * 1.0)) = min(3, 2.3) = 2.3), then subtract 1</td></tr><tr><td>Request 3</td><td>0.9</td><td>0.4</td><td>Fill the TokenBucket to 1.4 (min(3, (1.3 + (.9 - .8) * 1.0)) = min(3, 1.4) = 1.4), then subtract 1</td></tr><tr><td>Request 4</td><td>1.0</td><td>0.5</td><td>Fill the TokenBucket to 0.5 (<code>min(3, (.4 + (1.0 - .9) * 1.0)) = min(3, 0.5) = 0.5</code>). <strong>Ratelimit</strong> because we don't have enough tokens available</td></tr><tr><td>Request 5</td><td>1.4</td><td>0.9</td><td>Fill the TokenBucket to 0.9 (<code>min(3, (0.5 + (1.4 - 1.0) * 1.0)) = min(3, 0.9) = 0.9</code>). <strong>Ratelimit</strong> because we don't have enough tokens available</td></tr><tr><td>Request 6</td><td>1.8</td><td>0.3</td><td>Fill the TokenBucket to 1.3 (<code>min(3, (0.9 + (1.8 - 1.4) * 1.0)) = min(3, 1.3) = 1.3</code>), then remove 1</td></tr><tr><td>Request 7</td><td>5.0</td><td>2.0</td><td>Fill the TokenBucket to 3.0 (<code>min(3, (0.3 + (5.0 - 1.8) * 1.0)) = min(3, 3.5) = 3</code>) since we would "overflow" with our calculations. Then subtract 1 token</td></tr></tbody></table>


# Introduction

Octane: Crypto to Fiat On and Off Ramp

Welcome to the Octane API Documentation! This section of our documentation covers everything related to our crypto on and off ramp products, including order APIs, supported blockchains, support cryptocurrency, and more.

Octane offers a robust set of APIs designed to streamline and enhance your crypto on and off-ramp experience. Explore our powerful endpoints to manage bank accounts, execute orders, and gain comprehensive insights into your transactions.

To get started, you'll need to create an account and API key with Abyiss. This will allow you to access our endpoints and start building your applications. You can create an account by [clicking the link here](https://abyiss.com/signin), and learn more about [API Keys and Authorization](/introduction/api-architecture/api-keys-authentication) by clicking the link provided here.

We hope this documentation will serve as a helpful resource as you work with our centralized exchange API. If you have any questions or need assistance, please don't hesitate to contact our [support team](https://abyiss.com/contact).

## **About Octane: Your Crypto On & Off Ramp**

Octane stands as your trusted partner in navigating the realm of cryptocurrency. Seamlessly bridging the gap between traditional fiat currency and the expansive universe of digital assets, Octane allows effortless conversion from dollars to millions of cryptocurrencies spanning across hundreds of blockchains.

## Key Features

1. **Diverse Crypto Transactions:**
   * **Cash-to-Crypto:** Effortlessly convert dollars to millions of cryptocurrencies, including Bitcoin, Ethereum, and USDC, across numerous blockchains.
   * **Crypto-to-Cash:** Facilitate the conversion of cryptocurrencies back to traditional fiat currencies.
   * **Crypto-to-Crypto Swaps:** Enable decentralized trades and swaps between various cryptocurrencies.
   * **Blockchain-to-Blockchain Cross-Chain Swaps:** Seamlessly trade or swap assets between different blockchains.
2. **Customizable Transaction Fees:**
   * Empower yourself by setting custom fees on transactions. Tailor your fee structure to align with your financial strategy, maximizing your earning potential.
3. **Bank Account & Wallet Connectivity:**
   * Easily link your bank accounts with crypto wallets, streamlining asset transfers without complex procedures or multi-step processes.


# Integration Guides

Streamline Transactions

Welcome to our Integration Guides section. Here, you'll find all the resources you need to seamlessly integrate our APIs into your application or business operations.

## Available Guides

* [**Crypto Off-Ramp APIs Guide for Businesses**](/octane-api/integration-guides/crypto-off-ramp-apis-business-guide)
  * This guide is designed for organizations looking to provide an effortless off-ramp experience for customers. It covers the entire process for customers who have completed Know Your Customer (KYC) or Know Your Business (KYB) procedures. Learn how to set up subaccounts, initiate transactions, and manage customer payment information, including bank accounts and digital wallets.


# Crypto Off Ramp APIs - Business Guide

For Organizations Streamlining Customer Transactions

This guide is crafted for organizations seeking a seamless off-ramp experience for customers who have completed the Know Your Customer (KYC) or Know Your Business (KYB) processes.&#x20;

It empowers organizations to create subaccounts effortlessly, enabling transaction initiation on behalf of customers with known KYC and payment information, including bank accounts and wallets.

## **Steps to Get Started:**

1. **Create an Abyiss Account:**
   * Visit [abyiss.com/signin](https://abyiss.com/signin) to create an Abyiss account for your organization.
2. **Get Your API Key:**
   * Go to [abyiss.com/home/settings](https://abyiss.com/home/settings) and obtain your API key.
3. **Complete KYB Information:**
   * Fill out the Know Your Business (KYB) information for your company at [abyiss.com/home/settings](https://abyiss.com/home/settings). This process typically takes a maximum of 1 day.
4. **Use Subaccount API:**
   * To create accounts for your customers both businesses and retail users you must utilize the [Subaccount API](/octane-api/apis/subaccounts).
   * Subaccounts:
     * A means of creating and controlling user accounts via a master account.
     * Can be interacted with via the master account's API key.
     * Think of this as another part of the apiKey.
     * Master account can interact with subAccount payment methods and transactions.
     * Master account cannot interact with subaccounts of a subaccount.
     * A subaccount can only have one master account.
5. **KYC/KYB API:**
   * Utilize our KYC/KYB API to upload customer information. KYC/KYB approval is crucial for subaccount transaction initiation.
6. **Upload Payment Information:**
   * For payment information, use our [Bank Accounts Payment Methods API](/octane-api/apis/payment-methods/bank-accounts) and [Wallets Payment API](/octane-api/apis/payment-methods/wallets).
7. **Initiate Transactions:**
   * Once the subaccount has completed KYC/KYB and uploaded sufficient payment methods, initiate transactions using our [Transactions API](/octane-api/apis/transactions).
8. **Integrate Webhooks:**
   * Enhance your integration by listening for transactions and account updates with Abyiss Webhooks.

Embark on a seamless journey with Abyiss Cryptocurrency Off Ramp APIs, unlocking the potential for efficient and secure transaction management for your organization.

## Abyiss Crypto Off-Ramp Diagram

<figure><img src="/files/dFFXhtoLangztFVNKqiY" alt=""><figcaption><p>Abyiss Crypto Off Ramp API Diagram Example</p></figcaption></figure>


# References

Octane: Crypto On & Off Ramp API reference documentation.

{% hint style="info" %}
**Abyiss Octane API Reference Documentation**&#x20;
{% endhint %}

Welcome to the Abyiss Octane: Crypto On and Off Ramp API Reference Documentation. Here, you can learn about the unique characteristics and core concepts behind our API.

Please note that you will need an account and API Key to access these endpoints. If you don't have an account yet, you can create one by [clicking here](https://abyiss.com/signin). To learn more about API Keys and Authorization, please [click here](/introduction/api-architecture/api-keys-authentication).

The following topics are covered in this documentation:

* [Transaction Types](/octane-api/references/transaction-types)
* [Payment Methods](/octane-api/references/payment-methods)
* [Transaction Fees](/octane-api/references/transaction-fees)
* [Parnter Fees](/octane-api/references/partner-fees)

If you have any questions or need further assistance, please don't hesitate to contact our support team at <support@abyiss.com>.


# Transaction Types

Types of transactions Octane supports.

## **Crypto Transactions:**

* **Cash-to-Crypto:** Effortlessly convert dollars to millions of cryptocurrencies, including Bitcoin, Ethereum, and USDC, across numerous blockchains.
* **Crypto-to-Cash:** Facilitate the conversion of cryptocurrencies back to traditional fiat currencies.
* **Crypto-to-Crypto Swaps:** Enable decentralized trades and swaps between various cryptocurrencies.
* **Blockchain-to-Blockchain Cross-Chain Swaps:** Seamlessly trade or swap assets between different blockchains.

## Cash-to-Crypto | On-Ramping

Cash-to-Crypto transactions serve as the gateway for users to seamlessly convert traditional fiat currencies, such as USD, into a diverse array of cryptocurrencies. Whether you're looking to invest in Bitcoin, Ethereum, or USDC, Octane offers a streamlined process with real-time exchange rates and transparent fee structures. This functionality ensures that users can transition from traditional financial assets to the dynamic world of cryptocurrencies with efficiency and ease.

## Crypto-to-Cash | Off-Ramping

Crypto-to-Cash transactions empower users to convert their digital assets back into traditional fiat currencies, facilitating seamless withdrawals to linked bank accounts. Octane ensures a secure and compliant withdrawal process, adhering to regulatory standards. This functionality is designed to provide users with flexibility, allowing them to move between the cryptocurrency and traditional financial worlds effortlessly.

## **Crypto-to-Crypto |Swaps**

Crypto-to-Crypto Swaps enable users to actively manage their digital asset portfolios by trading or swapping one cryptocurrency for another. Octane provides a decentralized and secure environment for executing these trades, with a wide range of supported cryptocurrencies and real-time market data.

## **Blockchain-to-Blockchain | Cross-Chain Swaps**

Blockchain-to-Blockchain Cross-Chain Swaps elevate the utility of digital assets by enabling users to exchange assets between different blockchains. Octane supports cross-chain transactions, allowing for interoperability and flexibility in managing a diverse range of digital assets.


# Payment Methods

Our platform supports various payment methods to facilitate transactions. Below are the current payment methods available:

## Bank Accounts

### Wire Transfer

* **Description:** Bank wire transfers are accepted, providing a reliable and secure method for fund transactions.
* **Currencies:** USD Only.
* **Transaction Times:**
  * Processing Time: 1-3 business days
  * Fees: Free for USD Wire Transfer. Your bank may charge a fee to send wire transfers.

### ACH Transfer

* **Description:** ACH transfers will soon be available for users, offering an alternative method for domestic bank transactions.
* **Transaction Times:**
  * Expected Processing Time: 3-5 business days

## Crypto Wallets

### Crypto Transfer

* **Description:** Crypto transactions are supported, allowing users to transfer digital assets instantly.
* **Blockchains:** For a full list of support blockchains please see the [Assets API](/octane-api/apis/assets) page.
* **Fees:**
  * Crypto Deposit Fees: None
  * Crypto Withdrawal Fees: Dynamic gas fees (please see the "[Dynamic Gas Fees](https://abyiss.com/fees)" section below for details)

## Debit & Credit Cards (Coming Soon)

We are excited to announce that support for Debit and Credit Card transactions will be available soon, providing an additional convenient and widely-used payment method for our users.

* **Description:** Users will soon be able to link their debit or credit cards to perform transactions seamlessly within our platform.
* **Transaction Times:**
  * Expected Processing Time: To be announced upon launch.
* **Fees:**
  * Transaction fees for Debit and Credit Cards will be made available upon the feature's launch.

*Stay tuned for updates on the availability and specifics of Debit and Credit Card transactions. We are committed to expanding our supported payment methods to enhance your experience with our platform.*

## Contact Us

For inquiries or requests related to ACH and Card transfers, or any other support-related matters, please [contact us here](https://abyiss.com/contact).


# Transaction Fees

Discover the most cost-effective and efficient ways to transact on our platform.

Explore our transaction fees to better understand the costs associated with different payment methods. For a detailed breakdown, visit our [Fees Page](https://abyiss.com/fees).


# Partner Fees

Generate revenue by setting custom fees on transactions initiated by your users.

{% hint style="warning" %}
**Partner Fees Dashboard Coming Soon**
{% endhint %}

Maximize your revenue potential with Abyiss Partner Fees – a powerful tool allowing you to customize transaction charges initiated by your users. Enjoy unparalleled flexibility as you tailor fees to align with your business strategy, all effortlessly managed through the Abyiss dashboard.

### **Key Features:**

* **Customizable Fees:** Define the fees you collect on transactions to suit your specific business model. With Abyiss, you're in control.
* **Seamless Configuration:** Effortlessly set fee parameters through our user-friendly dashboard. Fine-tune your revenue strategy with ease and precision.
* **Automatic Transaction Handling:** Once a transaction is completed, your designated address receives the specified fee amount in the requested token or fiat, streamlining the revenue collection process.

### **Partner Fee Details:**

* **Dynamic Percentage Charge:** Introduce a partner fee – a percentage charge applied to the transaction amount on behalf of the partner. This fee is entirely configurable, empowering partners to optimize their revenue streams.

### **How to Set Partner Fees:**

* **Navigate to Settings:** Utilize the Settings page within the dashboard for quick access to fee configuration.
* **Flexible Percentage Setting:** Enter your desired percentage under "FEE PERCENTAGE" and effortlessly click Update to implement changes.

Unlock the potential for increased profitability with Abyiss Partner Fees. Stay tuned for more in-depth information and comprehensive API documentation, empowering you to harness the full capabilities of our partner-centric fee management system.


# APIs

Octane: Crypto On & Off Ramp REST APIs documentation.

Welcome to the Octane REST API documentation! This page contains information about the API endpoints available for our Crypto On & Off Ramp.

## Authentication

To use our APIs, you'll need an account and an API Key. If you don't have one yet, create an [account with Abyiss](https://abyiss.com/signin) and learn more about [API Keys and Authorization](/introduction/api-architecture/api-keys-authentication) in our Authentication section.

## Endpoints

* [Transactions](/octane-api/apis/transactions)
* [Subaccounts](/octane-api/apis/subaccounts)
* [Bank Accounts](/octane-api/apis/payment-methods/bank-accounts)
* [Wallets](/octane-api/apis/payment-methods/wallets)
* [Crypto](/octane-api/apis/assets)
* [KYC (Know Your Customer)](/octane-api/apis/kyc-know-your-customer)

## Pro Tips for Reading Documentation

To better understand our documentation, here are some pro tips to keep in mind:

* **Be patient**: Take your time to go through the documentation to avoid missing important details.
* **Review terms**: Make sure to familiarize yourself with key terms and definitions used in the documentation.
* **Read slowly**: Read each section of the documentation slowly and carefully to ensure that you understand everything.
* **Reread things**: If you're having trouble understanding a particular section, reread it or consult external resources.
* **Click the drop-down arrows**: Expand the sections and sub-sections to see more detailed information.
* **Read the overviews**: Start with the overviews to get a general idea of the information available in the documentation.
* **Google anything you don't understand**: If you encounter unfamiliar terms or concepts, Google them to learn more.
* **Contact us if you're having trouble**: If you're still having trouble understanding our documentation, don't hesitate to contact our support team for assistance.

That's it! We hope this page helps you understand our API better. If you have any questions or concerns, please don't hesitate to contact our [support team](https://abyiss.com/contact).


# Transactions

The Transactions API within Octane empowers you to efficiently manage and retrieve orders associated with your account.

## Pre-Requisites

Before you can POST transactions, you need to have the following:

1. POST your [bank account](/octane-api/apis/payment-methods/bank-accounts) & retrieve your bank account ID
2. POST your [wallet](/octane-api/apis/payment-methods/wallets) & retrieve your wallet ID
3. Get [KYC approved by Abyiss](https://abyiss.com/home/onboarding). Please note - if you get redirected to the home page, you are already KYC approved.

## Introduction

Creating and managing transactions with the Octane Transactions API is a straightforward process:

* **Create Transaction (POST):**
  * Use the `/v2/octane/transactions` endpoint.
  * Provide essential details like blockchain type, currency pairs, quantities, and associated wallet and bank account information in the request body. More on this below.
  * Results in successful order creation with timestamp and transaction type details.
* **Retrieve All Orders (GET):**
  * Utilize the `/v2/octane/transactions` endpoint with a GET request.
  * Retrieve all orders linked to the provided apiKey.
  * Access detailed information such as IDs, blockchain specifics, currencies involved, and timestamps.
  * Upcoming filtering options allow you to refine results.
* **Retrieve Specific Order (GET):**
  * Access details of a specific order using the `/v2/octane/transactions/:id` endpoint.
  * Provide the order's ID and apiKey.
  * Retrieve comprehensive details, including transaction types, completion status, and precise currency exchange specifics.

## Transactions API Endpoints

## Post Transaction

<mark style="color:green;">`POST`</mark> `https://api.abyiss.com/v2/octane/transactions`

Returns a 201 status code upon successful query. Then returns the successful order. Requires user to have associated bank account and wallet.

### Headers

| Name                                     | Type   | Description   |
| ---------------------------------------- | ------ | ------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Blockchain ID |

### Request Body

The transaction request object is broken up into two levels. The top-level transaction request object contains the three fields in the following table. The second level contains the information inside the sourceOrder and destinationOrder objects.

| Top Level Transaction Field Name                   | Type   | Description                                                |
| -------------------------------------------------- | ------ | ---------------------------------------------------------- |
| settlementMethod<mark style="color:red;">\*</mark> | string | How the fiat-side of the transaction will be settled.      |
| sourceOrder<mark style="color:red;">\*</mark>      | object | Information about where you are sending the currency from. |
| destinationOrder<mark style="color:red;">\*</mark> | object | Information about where you are sending the currency to.   |

The sourceOrder and the Destination Order are identical in structure. It is worth noting that not all fields are required for each destination and source order. However, a combination of all fields are required amongst the entire transaction. Please reference [transaction customization](#transaction-customization) for more information. The fields for source and destination order request objects are outlined below.

| Order Field Name                                | Type   | Description                                                 |
| ----------------------------------------------- | ------ | ----------------------------------------------------------- |
| walletId<mark style="color:red;">\*</mark>      | string | The user's wallet ID associated with the order.             |
| blockchain<mark style="color:red;">\*</mark>    | string | Blockchain used for the order.                              |
| currency<mark style="color:red;">\*</mark>      | string | Currency of the order.                                      |
| quantity<mark style="color:red;">\*</mark>      | string | Quantity of the currency in the order.                      |
| bankAccountId<mark style="color:red;">\*</mark> | string | The user's bank ID which the fiat will be sent or received. |

{% tabs %}
{% tab title="201: Created Success" %}

```json
{
  "id": "txn-123456815",
  "type": "OFF_RAMP",
  "createdAt": "2025-02-02T01:40:48.492",
  "flaggedAt": null,
  "completedAt": null,
  "updatedAt": "2025-02-02T01:40:48.487",
  "feeUsd": "0.5",
  "priceUsd": "50",
  "sourceOrder": {
    "bankAccountId": null,
    "blockchain": "ethereum",
    "currency": "USDC",
    "quantity": "50",
    "walletId": "wal-123456790"
  },
  "destinationOrder": {
    "bankAccountId": "bac-123456788",
    "blockchain": null,
    "currency": "USD",
    "quantity": "49.5",
    "walletId": null,
    "walletAddress": "0x065149eab6eFa05F4639Da6305B58C91BD92d456"
  }
}
```

{% endtab %}

{% tab title="400: Bad Request" %}

```json
{
  "errors": [{
    "message": "Invalid Request: Missing required field"
  }],
  "code": 400
}
```

{% endtab %}

{% tab title="401: Unauthorized" %}

```json
{
  "errors": [{
    "message": "Unauthorized: Invalid API Key"
  }],
  "code": 401
}
```

{% endtab %}

{% tab title="403: Forbidden" %}

```json
{
  "errors": [{
    "message": "Forbidden: Account is not KYC/KYB verified. Please contact support@abyiss.com"
  }],
  "code": 403
}
```

{% endtab %}
{% endtabs %}

### Transaction Customization

#### Selecting a Settlement Method

Abyiss supports `ACH` and `WIRE` as settlement methods. You can select the settlement method by providing one of the othe former values in the `transaction.settlementMethod` field. Please note that for on ramping, we only support `WIRE` transactions. This means that if you would like to buy crypto with a fiat currency, you must send Abyiss a wire transfer. For off ramping, we support both `ACH` and `WIRE` transactions. This means that if you would like to sell crypto for a fiat currency, you can choose to receive USD directly in your bank account via either WIRE or ACH.

**WIRES**

Wires cost $25 when OFF RAMPing. We do not charge for WIRES when ON RAMPing, however, your bank may charge you a wire fee.

When off ramping via wire, you will receive your funds in your bank account within 1-2 business days. Often times, you will receive your funds the same day that we send them. Please note that since Abyiss is a US-based company, we only send wires during US business hours. This means that if you request a wire after 5 PM EST, it will most likely be sent the next business day.

**ACH**

ACH transactions are completely free on the Abyiss network. ACH transactions can take 2-5 business days to settle. ACH transactions are only available for off ramping. This means that if you would like to sell crypto for a fiat currency, you can choose to receive USD directly in your bank account via ACH.

#### Selecting a Blockchain

Please ensure that when selecting a blockchain, that you are using a wallet address that has been registered to that blockchain. For example, if you are using the Ethereum blockchain, you must use an Ethereum wallet address. If you are using the Avalanche blockchain, you must use an Avalanche wallet address. For wallet addresses that are usable across multiple blockchains, you must register the wallet address to each blockchain that you would like to use it with.

#### Off Ramp Transaction

Off ramp transactions are inferred from the request. If the source order contains wallet and blockchain information and the destination order contains bank account information, then the transaction is an off-ramp transaction. Off ramp transactions may be settled in your bank account via ACH or WIRE.

#### On Ramp Transaction

On ramp transactions are inferred from the request. If the source order contains bank account information and the destination order contains wallet and blockchain information, then the transaction is an on-ramp transaction. On ramp transactions are settled directly in your wallet.

## Get Transactions

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/octane/transactions`

Returns an array of all the orders for an associated `apiKey`.

#### Headers

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```json
[
  {
    "id": "txn-123456804",
    "type": "ON_RAMP",
    "settlementMethod": "WIRE",
    "priceUsd": "100.00",
    "feeUsd": "2.50",
    "createdAt": "2025-02-13T23:21:05.666",
    "flaggedAt": null,
    "completedAt": null,
    "updatedAt": "2025-02-13T23:21:05.665",
    "userId": "usr-123456788",
    "sourceOrder": {
      "id": "ord-123456887",
      "bankAccountId": "bac-123456788",
      "blockchain": null,
      "createdAt": "2025-02-13T23:21:05.666",
      "currency": "USD",
      "quantity": "100.00",
      "updatedAt": "2025-02-13T23:21:05.659",
      "walletId": null
    },
    "destinationOrder": {
      "id": "ord-123456884",
      "bankAccountId": null,
      "blockchain": "ethereum",
      "createdAt": "2025-02-13T23:21:05.666",
      "currency": "ETH",
      "quantity": "0.03647559689040861",
      "updatedAt": "2025-02-13T23:21:05.659",
      "walletId": "wal-123456788"
    }
  },
  {
    "id": "txn-123456807",
    "type": "OFF_RAMP",
    "settlementMethod": "WIRE",
    "priceUsd": "100.00",
    "feeUsd": "27.50",
    "createdAt": "2025-02-13T23:21:24.592",
    "flaggedAt": null,
    "completedAt": null,
    "updatedAt": "2025-02-13T23:21:24.589",
    "userId": "usr-123456788",
    "sourceOrder": {
      "id": "ord-123456881",
      "bankAccountId": null,
      "blockchain": "ethereum",
      "createdAt": "2025-02-13T23:21:24.592",
      "currency": "ETH",
      "quantity": "0.03740792973294478",
      "updatedAt": "2025-02-13T23:21:24.589",
      "walletId": "wal-123456788"
    },
    "destinationOrder": {
      "id": "ord-123456886",
      "bankAccountId": "bac-123456788",
      "blockchain": null,
      "createdAt": "2025-02-13T23:21:24.592",
      "currency": "USD",
      "quantity": "72.5",
      "updatedAt": "2025-02-13T23:21:24.589",
      "walletId": null
    }
  }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## Get Transaction by ID

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/octane/transactions/{transactionId}`

Returns an object for the `transactionId`for an associated `apiKey`.

#### Query Parameters

| Name                                            | Type   | Description    |
| ----------------------------------------------- | ------ | -------------- |
| transactionId<mark style="color:red;">\*</mark> | string | Transaction ID |

#### Headers

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
  "id": "txn-123456815",
  "type": "OFF_RAMP",
  "createdAt": "2024-02-02T01:40:48.492",
  "flaggedAt": null,
  "completedAt": null,
  "updatedAt": "2024-02-02T01:40:48.487",
  "sellOrder": {
    "id": "ord-123456870",
    "bankAccountId": null,
    "blockchain": "avalanche",
    "createdAt": "2024-02-02T01:40:48.492",
    "currency": "AVAX",
    "feeUsd": null,
    "priceUsd": "6.85",
    "quantity": ".2004",
    "updatedAt": "2024-02-02T01:40:48.486",
    "walletId": "wal-123456790"
  },
  "buyOrder": {
    "id": "ord-123456871",
    "bankAccountId": "bac-123456788",
    "blockchain": null,
    "createdAt": "2024-02-02T01:40:48.492",
    "currency": "USD",
    "feeUsd": "0.17",
    "priceUsd": "6.85",
    "quantity": "6.67",
    "updatedAt": "2024-02-02T01:40:48.486",
    "walletId": null,
  }
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## **Copy & Paste Code**

**POST Transactions**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -X POST https://api.abyiss.com/v2/octane/transactions?apiKey=YOUR_API_KEY_HERE \
-H "Content-Type: application/json" \
-d '{
  "transaction": {
    "sellOrder": {
      "walletId": "wal-123456790",
      "blockchain": "avalanche",
      "currency": "AVAX",
      "quantity": ".2004"
    },
    "buyOrder": {
      "bankAccountId": "bac-123456788",
      "currency": "USD"
    }
  }
}'
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

url = "https://api.abyiss.com/v2/octane/transactions?apiKey=YOUR_API_KEY_HERE"

headers = {
    'Content-Type': 'application/json'
}

# Replace the below dictionary with your order details
payload = {
  "transaction": {
    "sellOrder": {
      "walletId": "wal-123456790",
      "blockchain": "avalanche",
      "currency": "AVAX",
      "quantity": ".2004"
    },
    "buyOrder": {
      "bankAccountId": "bac-123456788",
      "currency": "USD"
    }
  }
}

response = requests.post(url, headers=headers, data=json.dumps(payload))

print(response.status_code)  # This will print the status code of the response
print(response.json())  # This will print the response content as JSON
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const url = 'https://api.abyiss.com/v2/octane/transactions?apiKey=YOUR_API_KEY_HERE';

const payload = {
  "transaction": {
    "sellOrder": {
      "walletId": "wal-123456790",
      "blockchain": "avalanche",
      "currency": "AVAX",
      "quantity": ".2004"
    },
    "buyOrder": {
      "bankAccountId": "bac-123456788",
      "currency": "USD"
    }
  }
};

fetch(url, {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json'
  },
  body: JSON.stringify(payload)
})
  .then(response => {
    if (!response.ok) {
      throw new Error('Network response was not ok');
    }
    return response.json();
  })
  .then(data => {
    console.log(data); // Handle the response data
  })
  .catch(error => {
    console.error('There has been a problem with your fetch operation:', error);
  });

```

{% endtab %}
{% endtabs %}

**GET Transactions**

{% tabs %}
{% tab title="Curl" %}

```bash
curl "https://api.abyiss.com/v2/octane/transactions?apiKey=YOUR_API_KEY_HERE"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = 'https://api.abyiss.com/v2/octane/transactions?apiKey=YOUR_API_KEY_HERE'

response = requests.get(url)

print(response.status_code)  # This will print the status code of the response
print(response.json())  # This will print the response content as JSON
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const url = 'https://api.abyiss.com/v2/octane/transactions?apiKey=YOUR_API_KEY_HERE';

fetch(url)
  .then(response => {
    if (!response.ok) {
      throw new Error('Network response was not ok');
    }
    return response.json();
  })
  .then(data => {
    console.log(data); // Handle the response data
  })
  .catch(error => {
    console.error('There has been a problem with your fetch operation:', error);
  });
```

{% endtab %}
{% endtabs %}

## **Transactions Response Object**

{% tabs %}
{% tab title="POST Transactions" %}
Example URL: <https://api.abyiss.com/v2/octane/transactions?apiKey=>

```json
{
  "id": "txn-123456815",
  "type": "OFF_RAMP",
  "createdAt": "2024-02-02T01:40:48.492",
  "flaggedAt": null,
  "completedAt": null,
  "updatedAt": "2024-02-02T01:40:48.487",
  "sellOrder": {
    "id": "ord-123456870",
    "bankAccountId": null,
    "blockchain": "avalanche",
    "createdAt": "2024-02-02T01:40:48.492",
    "currency": "AVAX",
    "feeUsd": null,
    "priceUsd": "6.85",
    "quantity": ".2004",
    "updatedAt": "2024-02-02T01:40:48.486",
    "walletId": "wal-123456790"
  },
  "buyOrder": {
    "id": "ord-123456871",
    "bankAccountId": "bac-123456788",
    "blockchain": null,
    "createdAt": "2024-02-02T01:40:48.492",
    "currency": "USD",
    "feeUsd": "0.17",
    "priceUsd": "6.85",
    "quantity": "6.67",
    "updatedAt": "2024-02-02T01:40:48.486",
    "walletId": null,
    "walletAddress": "0x065149eab6eFa05F4639Da6305B58C91BD92d456"
  }
}
```

{% endtab %}

{% tab title="Get Transactions" %}
Example URL: <https://api.abyiss.com/v2/octane/transactions?apiKey=>

```json
[
  {
    "id": "txn-123456791",
    "type": "OFF_RAMP",
    "createdAt": "2024-01-30T16:31:06.407",
    "flaggedAt": null,
    "completedAt": null,
    "updatedAt": "2024-01-30T16:31:06.401",
    "sellOrder": {
      "id": "ord-123456790",
      "bankAccountId": null,
      "blockchain": "ethereum",
      "createdAt": "2024-01-30T16:31:06.407",
      "currency": "ETH",
      "feeUsd": null,
      "priceUsd": null,
      "quantity": "54.555544",
      "updatedAt": "2024-01-30T16:31:06.4",
      "walletId": "wal-123456790"
    },
    "buyOrder": {
      "id": "ord-123456791",
      "bankAccountId": "bac-123456788",
      "blockchain": null,
      "createdAt": "2024-01-30T16:31:06.407",
      "currency": "USD",
      "feeUsd": null,
      "priceUsd": null,
      "quantity": null,
      "updatedAt": "2024-01-30T16:31:06.4",
      "walletId": null
    }
},
{
    "id": "txn-123456790",
    "type": "OFF_RAMP",
    "createdAt": "2024-01-30T16:31:21.479",
    "flaggedAt": null,
    "completedAt": null,
    "updatedAt": "2024-01-30T16:31:21.475",
    "sellOrder": {
      "id": "ord-123456784",
      "bankAccountId": null,
      "blockchain": "avalanche",
      "createdAt": "2024-01-30T16:31:21.479",
      "currency": "AVAX",
      "feeUsd": null,
      "priceUsd": null,
      "quantity": "54.555544",
      "updatedAt": "2024-01-30T16:31:21.475",
      "walletId": "wal-123456790"
    },
    "buyOrder": {
      "id": "ord-123456785",
      "bankAccountId": "bac-123456788",
      "blockchain": null,
      "createdAt": "2024-01-30T16:31:21.479",
      "currency": "USD",
      "feeUsd": null,
      "priceUsd": null,
      "quantity": null,
      "updatedAt": "2024-01-30T16:31:21.475",
      "wallet": null,
    }
  }
]
```

{% endtab %}

{% tab title="Get Transaction by Id" %}
Example URL: <https://api.abyiss.com/v2/octane/transactions/txn-123456815?apiKey=>

```json
{
  "id": "txn-123456815",
  "type": "OFF_RAMP",
  "createdAt": "2024-02-02T01:40:48.492",
  "flaggedAt": null,
  "completedAt": null,
  "updatedAt": "2024-02-02T01:40:48.487",
  "sellOrder": {
    "id": "ord-123456870",
    "bankAccountId": null,
    "blockchain": "avalanche",
    "createdAt": "2024-02-02T01:40:48.492",
    "currency": "AVAX",
    "feeUsd": null,
    "priceUsd": "6.85",
    "quantity": ".2004",
    "updatedAt": "2024-02-02T01:40:48.486",
    "walletId": "wal-123456790"
  },
  "buyOrder": {
    "id": "ord-123456871",
    "bankAccountId": "bac-123456788",
    "blockchain": null,
    "createdAt": "2024-02-02T01:40:48.492",
    "currency": "USD",
    "feeUsd": "0.17",
    "priceUsd": "6.85",
    "quantity": "6.67",
    "updatedAt": "2024-02-02T01:40:48.486",
    "walletId": null
  }
}
```

{% endtab %}
{% endtabs %}

## Transactions Response Attributes

| Attribute Name | Data Type | Description                                                            |
| -------------- | --------- | ---------------------------------------------------------------------- |
| id             | string    | Unique identifier for the transaction.                                 |
| type           | string    | Type of transaction (OFF\_RAMP, ON\_RAMP).                             |
| createdAt      | string    | Timestamp indicating when the transaction was created.                 |
| flaggedAt      | string    | Timestamp indicating when the transaction was flagged (if applicable). |
| completedAt    | string    | Timestamp indicating when the transaction was completed.               |
| updatedAt      | string    | Timestamp indicating when the transaction was last updated             |
| sellOrder      | object    | Information about the sell order.                                      |
| buyOrder       | object    | Information about the buy order.                                       |
| id             | string    | Unique identifier for the order.                                       |
| bankAccountId  | string    | ID of the bank account associated with the order.                      |
| blockchain     | string    | Blockchain used for the order.                                         |
| createdAt      | string    | Timestamp indicating when the order was created.                       |
| currency       | string    | Currency to be sold or bought.                                         |
| feeUsd         | string    | Fee in USD for the order.                                              |
| priceUsd       | string    | Price in USD for the order.                                            |
| quantity       | string    | Quantity of the currency to be bought or sold.                         |
| updatedAt      | string    | Timestamp indicating when the order was last updated.                  |
| walletId       | string    | ID of the wallet associated with the order.                            |


# Assets

The Octane Assets API gets the all the cryptocurrencies and blockchains supported for transactions.

Crypto API for Octane: Crypto On and Off Ramp. This endpoint gets the cryptocurrencies supported for transactions.

## Asset API Endpoint

## Get Cryptocurrencies

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/octane/crypto`

Returns an object containing information related to what assets the Abyiss Network supports.

#### Headers

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK -- Success" %}

```json
{
  "supportedBlockchains": [
    "ethereum",
    "solana",
    "bitcoin",
    "dogecoin"
  ],
  "fiatCurrencies": {
    "USD": {
      "name": "United States Dollar",
      "base": "USD",
      "logo": "https://raw.githubusercontent.com/abyiss/cryptoicons/master/SVG/usd.svg"
    }
  },
  "tokens": {
    "AAVE": {
      "base": "AAVE",
      "logo": "https://raw.githubusercontent.com/abyiss/cryptoicons/master/SVG/aave.svg",
      "name": "Aave",
      "quotes": ["USD"],
      "blockchains": ["ethereum"],
      "decimals": 18,
      "limits": { "min": 0.001, "max": null }
    },
    "ALI": {
      "base": "ALI",
      "logo": "https://raw.githubusercontent.com/abyiss/cryptoicons/master/SVG/ali.svg",
      "name": "Alethea Artificial Liquid Intelligence",
      "quotes": ["USD"],
      "blockchains": ["ethereum"],
      "decimals": 18,
      "limits": { "min": 2, "max": null }
    }
  },
  "tokensbyBlockchain": {
    "ethereum": [{
      "base": "AAVE",
      "logo": "https://raw.githubusercontent.com/abyiss/cryptoicons/master/SVG/aave.svg",
      "name": "Aave",
      "quotes": ["USD"],
      "blockchains": ["ethereum"],
      "decimals": 18,
      "limits": { "min": 0.001, "max": null }
    }],
    "solana": [{
      "base": "BOME",
      "logo": "https://raw.githubusercontent.com/abyiss/cryptoicons/master/SVG/bome.svg",
      "name": "BOOK OF MEME",
      "quotes": ["USD"],
      "blockchains": ["solana"],
      "decimals": 6,
      "limits": { "min": 10, "max": null }
    },
  }
}
```

{% endtab %}

{% tab title="401: Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## **Copy & Paste Code**

**GET Assets**

{% tabs %}
{% tab title="Curl" %}

```bash
curl "https://api.abyiss.com/v2/octane/crypto?apiKey=YOUR_API_KEY_HERE"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = 'https://api.abyiss.com/v2/octane/crypto?apiKey=YOUR_API_KEY_HERE'

response = requests.get(url)

print(response.status_code)  # This will print the status code of the response
print(response.json())  # This will print the response content as JSON
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const url = 'https://api.abyiss.com/v2/octane/crypto?apiKey=YOUR_API_KEY_HERE';

fetch(url)
  .then(response => {
    if (!response.ok) {
      throw new Error('Network response was not ok');
    }
    return response.json();
  })
  .then(data => {
    console.log(data); // Handle the response data
  })
  .catch(error => {
    console.error('There has been a problem with your fetch operation:', error);
  });
```

{% endtab %}
{% endtabs %}

## Asset **Response Object**

| Attribute Name       | Data Type        | Description                               |
| -------------------- | ---------------- | ----------------------------------------- |
| supportedBlockchains | array of strings | Blockchains Supported by Abyiss           |
| fiatCurrencies       | object           | Supported Fiat Currencies                 |
| tokens               | object           | Supported Tokens                          |
| tokensbyBlockchain   | object           | Supported Tokens by Blockchain            |
| defaultTokens        | object           | Default Tokens Displayed on Abyiss Widget |


# Payment Methods

The Octane Payment Methods API provides developers with functionality to manage and retrieve information related to payment methods associated with their accounts.

{% hint style="info" %}
**To request a payment method, reach out to our dedicated support team at** [**support@abyiss.com**](mailto:support@abyiss.com)**. We're here to assist you!**
{% endhint %}

## Supported Payment Methods

### [Bank Accounts Management](/octane-api/apis/payment-methods/bank-accounts)

* **Wires:** Swift and secure wire transfers.
* **ACH Transactions:** Streamlined ACH transactions for your convenience.

**Features:**

* Retrieve a comprehensive list of bank accounts associated with your API key.
* Access specific bank account details by querying with the bank account ID.
* Create new bank accounts effortlessly by providing essential details in the request body.

### [Wallets Management](/octane-api/apis/payment-methods/wallets)

* **Crypto Wallets:** Manage your cryptocurrency wallets effortlessly.
* **Blockchains:** Explore and leverage various blockchain technologies.

**Features:**

* Obtain a detailed list of wallets linked to your specific API key.
* Fetch specific wallet details by querying with the wallet ID.
* Facilitate the creation of new wallets seamlessly by submitting wallet information in the request body.

This API simplifies the integration of payment methods into your applications, providing developers with the flexibility to efficiently organize and leverage financial data within the Octane ecosystem. Feel free to explore the possibilities and enhance your payment processing capabilities.


# Bank Accounts

The Bank Accounts API

## Introduction

The Octane Bank Accounts API provides developers with functionality to manage and retrieve information related to bank accounts with their accounts.

* **Bank Accounts:**
  * Retrieve a comprehensive list of bank accounts associated with a given API key.
  * Access specific bank account details by querying with the bank account ID.
  * Create new bank accounts by providing essential details in the request body.
  * Deletes a specific bank account by providing the bank account ID.

## Bank Account API Endpoints

### Post US Bank Account

<mark style="color:green;">`POST`</mark> `https://api.abyiss.com/v2/octane/paymentMethods/bankAccounts`

Create a new US bank account by providing the necessary account details. Upon a successful request, it returns a 201 status code along with the details of the created bank account.

**Headers**

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

**Request Body**

| Name                                                        | Type   | Description                               |
| ----------------------------------------------------------- | ------ | ----------------------------------------- |
| routingNumber<mark style="color:red;">\*</mark>             | string | The bank account routing number.          |
| accountNumber<mark style="color:red;">\*</mark>             | string | The bank account number.                  |
| billingDetails<mark style="color:red;">\*</mark>            | object | Customer's billing details.               |
| billingDetails.city<mark style="color:red;">\*</mark>       | string | City in the billing address.              |
| billingDetails.country<mark style="color:red;">\*</mark>    | string | Country in the billing address.           |
| billingDetails.line1<mark style="color:red;">\*</mark>      | string | Address line 1 in the billing address.    |
| billingDetails.line2                                        | string | Address line 2 in the billing address.    |
| billingDetails.province<mark style="color:red;">\*</mark>   | string | Province or state in the billing address. |
| billingDetails.fullName<mark style="color:red;">\*</mark>   | string | Full name of the billing contact.         |
| billingDetails.phone<mark style="color:red;">\*</mark>      | string | Phone number of the billing contact.      |
| billingDetails.postalCode<mark style="color:red;">\*</mark> | string | Postal code in the billing address.       |

{% tabs %}
{% tab title="201: Created -- Success" %}

```json
{
  "id": "bac-123456788",
  "routingNumber": "12345",
  "accountNumber": "67890",
  "bankName": "Bank of America",
  "createdAt": "2024-07-23T14:04:28.788",
  "updatedAt": "2024-07-23T14:04:28.781",
  "userId": "usr-123456788",
  "fiatCurrency": "USD",
  "bankAddress": {
    "city": "ORLANDO",
    "country": "UNITED_STATES",
    "line1": "1123 PROMANADE ST",
    "line2": null,
    "province": "FL",
    "createdAt": "2024-07-23T14:04:28.788",
    "updatedAt": "2024-07-23T14:04:28.781"
  },
  "billingDetails": {
    "city": "BOSTON",
    "country": "UNITED_STATES",
    "line1": "342 MAIN ST",
    "line2": "SUITE 100",
    "province": "MA",
    "createdAt": "2024-07-23T14:04:28.788",
    "updatedAt": "2024-07-23T14:04:28.781",
    "fullName": "GAVIN BELSON",
    "phone": "1112223333",
    "postalCode": "02142"
  }
}
```

{% endtab %}

{% tab title="401: Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Get Bank Accounts

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/octane/paymentMethods/bankAccounts`

Retrieves all bank accounts associated with the provided API key. Upon a successful request, it returns a 200 status code and a list of bank accounts.

**Headers**

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK -- Success" %}

```json
[{
  "id": "bac-123456788",
  "routingNumber": "12345",
  "accountNumber": "67890",
  "bankName": "Bank of America",
  "createdAt": "2024-07-23T14:04:28.788",
  "updatedAt": "2024-07-23T14:04:28.781",
  "userId": "usr-123456788",
  "fiatCurrency": "USD",
  "bankAddress": {
    "city": "ORLANDO",
    "country": "UNITED_STATES",
    "line1": "1123 PROMANADE ST",
    "line2": null,
    "province": "FL",
    "createdAt": "2024-07-23T14:04:28.788",
    "updatedAt": "2024-07-23T14:04:28.781"
  },
  "billingDetails": {
    "city": "BOSTON",
    "country": "UNITED_STATES",
    "line1": "342 MAIN ST",
    "line2": "SUITE 100",
    "province": "MA",
    "createdAt": "2024-07-23T14:04:28.788",
    "updatedAt": "2024-07-23T14:04:28.781",
    "fullName": "GAVIN BELSON",
    "phone": "1112223333",
    "postalCode": "02142"
  }
}]
```

{% endtab %}

{% tab title="401: Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Get Bank Account by ID

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/octane/paymentMethods/bankAccounts/{bankAccountId}`

Retrieves the details of a specific bank account using its unique bank account ID. Upon a successful request, it returns a 200 status code and the details of the requested bank account.

**Headers**

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

**Query Parameters**

| Name                                            | Type   | Description     |
| ----------------------------------------------- | ------ | --------------- |
| bankAccountId<mark style="color:red;">\*</mark> | string | Bank Account Id |

{% tabs %}
{% tab title="200: OK -- Success" %}

```json
{
  "id": "bac-123456788",
  "routingNumber": "12345",
  "accountNumber": "67890",
  "bankName": "Bank of America",
  "createdAt": "2024-07-23T14:04:28.788",
  "updatedAt": "2024-07-23T14:04:28.781",
  "userId": "usr-123456788",
  "fiatCurrency": "USD",
  "bankAddress": {
    "city": "ORLANDO",
    "country": "UNITED_STATES",
    "line1": "1123 PROMANADE ST",
    "line2": null,
    "province": "FL",
    "createdAt": "2024-07-23T14:04:28.788",
    "updatedAt": "2024-07-23T14:04:28.781"
  },
  "billingDetails": {
    "city": "BOSTON",
    "country": "UNITED_STATES",
    "line1": "342 MAIN ST",
    "line2": "SUITE 100",
    "province": "MA",
    "createdAt": "2024-07-23T14:04:28.788",
    "updatedAt": "2024-07-23T14:04:28.781",
    "fullName": "GAVIN BELSON",
    "phone": "1112223333",
    "postalCode": "02142"
  }
}
```

{% endtab %}

{% tab title="401: Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Delete Bank Account

<mark style="color:red;">`DELETE`</mark>` `` ``https://api.abyiss.com/v2/octane/paymentMethods/bankAccounts/{bankAccountId} `

Deletes a specified bank account using its unique bank account ID. Upon a successful request, it returns a 204 status code indicating that the wallet has been deleted.

**Headers**

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

**Query Parameters**

| Name                                            | Type   | Description     |
| ----------------------------------------------- | ------ | --------------- |
| bankAccountId<mark style="color:red;">\*</mark> | string | Bank Account Id |

**Response**

{% tabs %}
{% tab title="204: No Content -- Deleted" %}

```json
No Content
```

{% endtab %}

{% tab title="401: Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## **Copy & Paste Code**

### **POST Bank Accounts**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -X POST \
  -H "Content-Type: application/json" \
  -H "apiKey: your-api-key" \
  -d '{
    "routingNumber": "12555342345",
    "accountNumber": "67555234890",
    "billingDetails": {
      "city": "Boston",
      "country": "USA",
      "line1": "123 Bill Me Dr",
      "province": "MA",
      "fullName": "Frank Tester",
      "phone": "123345456",
      "postalCode": "123543"
    }
  }' \
  https://api.abyiss.com/v2/octane/paymentMethods/bankAccounts

```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

url = "https://api.abyiss.com/v2/octane/paymentMethods/bankAccounts"
headers = {
  "Content-Type": "application/json",
  "apiKey": "your-api-key"
}

bank_account_data = {
  "routingNumber": "12555342345",
  "accountNumber": "67555234890",
  "billingDetails": {
    "city": "Boston",
    "country": "USA",
    "line1": "123 Bill Me Dr",
    "province": "MA",
    "fullName": "Frank Tester",
    "phone": "123345456",
    "postalCode": "123543"
  }
}

response = requests.post(url, headers=headers, data=json.dumps(bank_account_data))

print(response.status_code)
print(response.json())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

const url = 'https://api.abyiss.com/v2/octane/paymentMethods/bankAccounts';
const headers = {
  'Content-Type': 'application/json',
  'apiKey': 'your-api-key'
};

const bankAccountData = {
  routingNumber: '12555342345',
  accountNumber: '67555234890',
  billingDetails: {
    city: 'Boston',
    country: 'USA',
    line1: '123 Bill Me Dr',
    province: 'MA',
    fullName: 'Frank Tester',
    phone: '123345456',
    postalCode: '123543'
  }
};

axios.post(url, bankAccountData, { headers })
  .then(response => {
    console.log(response.status);
    console.log(response.data);
  })
  .catch(error => {
    console.error(error.response.status);
    console.error(error.response.data);
  });
```

{% endtab %}
{% endtabs %}

### **GET Bank Accounts**

{% tabs %}
{% tab title="Curl" %}

```bash
curl "https://api.abyiss.com/v2/octane/paymentMethods/bankAccounts?apiKey=YOUR_API_KEY_HERE"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = 'httpshttps://api.abyiss.com/v2/octane/paymentMethods/bankAccounts?apiKey=YOUR_API_KEY_HERE'

response = requests.get(url)

print(response.status_code)  # This will print the status code of the response
print(response.json())  # This will print the response content as JSON
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const url = 'https://api.abyiss.com/v2/octane/paymentMethods/bankAccounts?apiKey=YOUR_API_KEY_HERE';

fetch(url)
  .then(response => {
    if (!response.ok) {
      throw new Error('Network response was not ok');
    }
    return response.json();
  })
  .then(data => {
    console.log(data); // Handle the response data
  })
  .catch(error => {
    console.error('There has been a problem with your fetch operation:', error);
  });
```

{% endtab %}
{% endtabs %}

## **Bank Accounts Response Object**

{% tabs %}
{% tab title="POST Bank Accounts" %}
Example URL: <https://api.abyiss.com/v2/octane/paymentMethods/bankAccounts?apiKey=>

```json
{
  "id": "bac-123456788",
  "routingNumber": "12345",
  "accountNumber": "67890",
  "bankName": "Bank of America",
  "createdAt": "2024-07-23T14:04:28.788",
  "updatedAt": "2024-07-23T14:04:28.781",
  "userId": "usr-123456788",
  "fiatCurrency": "USD",
  "bankAddress": {
    "city": "ORLANDO",
    "country": "UNITED_STATES",
    "line1": "1123 PROMANADE ST",
    "line2": null,
    "province": "FL",
    "createdAt": "2024-07-23T14:04:28.788",
    "updatedAt": "2024-07-23T14:04:28.781"
  },
  "billingDetails": {
    "city": "BOSTON",
    "country": "UNITED_STATES",
    "line1": "342 MAIN ST",
    "line2": "SUITE 100",
    "province": "MA",
    "createdAt": "2024-07-23T14:04:28.788",
    "updatedAt": "2024-07-23T14:04:28.781",
    "fullName": "GAVIN BELSON",
    "phone": "1112223333",
    "postalCode": "02142"
  }
}
```

{% endtab %}

{% tab title="Get Bank Accounts" %}
Example URL: <https://api.abyiss.com/v2/octane/paymentMethods/bankAccounts?apiKey=>

```json
[{
  "id": "bac-123456788",
  "routingNumber": "12345",
  "accountNumber": "67890",
  "bankName": "Bank of America",
  "createdAt": "2024-07-23T14:04:28.788",
  "updatedAt": "2024-07-23T14:04:28.781",
  "userId": "usr-123456788",
  "fiatCurrency": "USD",
  "bankAddress": {
    "city": "ORLANDO",
    "country": "UNITED_STATES",
    "line1": "1123 PROMANADE ST",
    "line2": null,
    "province": "FL",
    "createdAt": "2024-07-23T14:04:28.788",
    "updatedAt": "2024-07-23T14:04:28.781"
  },
  "billingDetails": {
    "city": "BOSTON",
    "country": "UNITED_STATES",
    "line1": "342 MAIN ST",
    "line2": "SUITE 100",
    "province": "MA",
    "createdAt": "2024-07-23T14:04:28.788",
    "updatedAt": "2024-07-23T14:04:28.781",
    "fullName": "GAVIN BELSON",
    "phone": "1112223333",
    "postalCode": "02142"
  }
}]
```

{% endtab %}

{% tab title="Get Bank Account by Id" %}
Example URL: <https://api.abyiss.com/v2/octane/paymentMethods/bankAccounts/bac-123456788?apiKey=>

```json
{
  "id": "bac-123456788",
  "routingNumber": "12345",
  "accountNumber": "67890",
  "bankName": "Bank of America",
  "createdAt": "2024-07-23T14:04:28.788",
  "updatedAt": "2024-07-23T14:04:28.781",
  "userId": "usr-123456788",
  "fiatCurrency": "USD",
  "bankAddress": {
    "city": "ORLANDO",
    "country": "UNITED_STATES",
    "line1": "1123 PROMANADE ST",
    "line2": null,
    "province": "FL",
    "createdAt": "2024-07-23T14:04:28.788",
    "updatedAt": "2024-07-23T14:04:28.781"
  },
  "billingDetails": {
    "city": "BOSTON",
    "country": "UNITED_STATES",
    "line1": "342 MAIN ST",
    "line2": "SUITE 100",
    "province": "MA",
    "createdAt": "2024-07-23T14:04:28.788",
    "updatedAt": "2024-07-23T14:04:28.781",
    "fullName": "GAVIN BELSON",
    "phone": "1112223333",
    "postalCode": "02142"
  }
}
```

{% endtab %}
{% endtabs %}

## Bank Accounts Response Attributes

| Attribute Name            | Type   | Description                                    |
| ------------------------- | ------ | ---------------------------------------------- |
| id                        | string | Unique bank account id.                        |
| routingNumber             | string | The bank account routing number.               |
| accountNumber             | string | The bank account number.                       |
| bankName                  | string | The bank name.                                 |
| createdAt                 | string | The timestamp the bank account was created at. |
| updatedAt                 | string | The timestamp the bank account was updated at. |
| userId                    | string | Unique user id.                                |
| bankAddress               | object | Customers bank detials.                        |
| bankAddress.city          | string | City where the bank is located.                |
| bankAddress.country       | string | Country where the bank is located.             |
| bankAddress.line1         | string | Address line 1 of the bank.                    |
| bankAddress.line2         | string | Address line 2 of the bank.                    |
| bankAddress.province      | string | Province or state where the bank is located.   |
| billingDetails            | object | Customers billing details.                     |
| billingDetails.city       | string | City in the billing address.                   |
| billingDetails.country    | string | Country in the billing address.                |
| billingDetails.line1      | string | Address line 1 in the billing address.         |
| billingDetails.line2      | string | Address line 2 in the billing address.         |
| billingDetails.province   | string | Province or state in the billing address.      |
| billingDetails.fullName   | string | Full name of the billing contact.              |
| billingDetails.phone      | string | Phone number of the billing contact.           |
| billingDetails.postalCode | string | Postal code in the billing address.            |


# Wallets

The Crypto Wallets API

{% hint style="warning" %}
**The Endpoint is in Beta**
{% endhint %}

## Introduction

The Octane Wallets API provides developers with functionality to manage and retrieve information related to crypto wallets with their accounts.

* **Wallets:**
  * Obtain a detailed list of wallets linked to a specific API key.
  * Fetch specific wallet details by querying with the wallet ID.
  * Facilitate the creation of new wallets by submitting wallet information in the request body.
  * Deletes a specific wallet by providing the wallet ID.

## Wallet API Endpoints

### Post Wallets

<mark style="color:green;">`POST`</mark> `https://api.abyiss.com/v2/octane/paymentMethods/wallets`

Create a new crypto wallet by providing the required wallet details. Upon a successful request, it returns a 201 status code along with the details of the created wallet.

**Headers**

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

**Request Body**

| Name                                         | Type   | Description                                   |
| -------------------------------------------- | ------ | --------------------------------------------- |
| address<mark style="color:red;">\*</mark>    | string | The wallet address,                           |
| blockchain<mark style="color:red;">\*</mark> | string | The blockchain the wallet is associated with. |

{% tabs %}
{% tab title="201: Created -- Success" %}

```json
{
  "id": "wal-123456785",
  "userId": "usr-123456788",
  "address": "some-addy",
  "blockchain": "some-chain",
  "createdAt": "2024-02-02T02:09:55.963",
  "updatedAt": "2024-02-02T02:09:55.958"
}
```

{% endtab %}

{% tab title="401: Unauthorized -- Invalid API Key" %}

```json
{
  "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Get Wallets

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/octane/paymentMethods/wallets`

Retrieves all crypto wallets associated with the provided API key. Upon a successful request, it returns a 200 status code and a list of wallets.

**Headers**

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK -- Success" %}

```json
[
  {
    "id": "wal-123456788",
    "userId": "usr-123456788",
    "address": "someAddress",
    "blockchain": "ethereum",
    "createdAt": "2024-01-30T15:06:08.568",
    "updatedAt": "2024-01-30T15:06:08.563"
  },
  {
    "id": "wal-123456785",
    "userId": "usr-123456788",
    "address": "1234568",
    "blockchain": "bitcoin",
    "createdAt": "2024-02-02T02:09:55.963",
    "updatedAt": "2024-02-02T02:09:55.958"
  }
]
```

{% endtab %}

{% tab title="401: Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Get Wallet by ID

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/octane/paymentMethods/wallets/{walletId}`

Retrieves the details of a specific crypto wallet using its unique wallet ID. Upon a successful request, it returns a 200 status code and the details of the requested wallet.

**Headers**

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

**Query Parameters**

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| walletId<mark style="color:red;">\*</mark> | string | Wallet Id   |

{% tabs %}
{% tab title="200: OK -- Success" %}

```json
{
  "id": "wal-123456785",
  "userId": "usr-123456788",
  "address": "some-addy",
  "blockchain": "bitcoin",
  "createdAt": "2024-02-02T02:09:55.963",
  "updatedAt": "2024-02-02T02:09:55.958"
}
```

{% endtab %}

{% tab title="401: Unauthorized -- Invalid API Key" %}

```json
{
  "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Delete Wallet by ID

<mark style="color:red;">`DELETE`</mark>`https://api.abyiss.com/v2/octane/paymentMethods/wallets/{walletId}`

Deletes a specified crypto wallet using its unique wallet ID. Upon a successful request, it returns a 204 status code indicating that the wallet has been deleted.

**Headers**

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

**Query Parameters**

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| walletId<mark style="color:red;">\*</mark> | string | Wallet Id   |

**Response**

{% tabs %}
{% tab title="204: No Content -- Deleted" %}

```json
No Content
```

{% endtab %}

{% tab title="401: Unauthorized -- Invalid API Key" %}

```json
{
  "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## **Copy & Paste Code**

### **POST Wallets**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -X POST \
  -H "Content-Type: application/json" \
  -H "apiKey: 123abc" \
  -d '{
    "wallet": {
      "address": "0xsome-address",
      "blockchain": "Ethereum",
    }
  }' \
  https://api.abyiss.com/v2/octane/paymentMethods/wallets
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

url = "https://api.abyiss.com/v2/octane/paymentMethods/wallets"
headers = {
  "Content-Type": "application/json",
  "apiKey": "123abc"
}

wallet_data = {
  "wallet": {
    "address": "0xsome-address",
    "blockchain": "Ethereum"
  }
}

response = requests.post(url, headers=headers, data=json.dumps(wallet_data))

print(response.status_code)
print(response.json())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

const url = 'https://api.abyiss.com/v2/octane/paymentMethods/wallets';
const headers = {
  'Content-Type': 'application/json',
  'apiKey': '123abc'
};

const walletData = {
  wallet: {
    address: '0xsome-address',
    blockchain: 'Ethereum'
  }
};

axios.post(url, walletData, { headers })
  .then(response => {
    console.log(response.status);
    console.log(response.data);
  })
  .catch(error => {
    console.error(error.response.status);
    console.error(error.response.data);
  });
```

{% endtab %}
{% endtabs %}

### **GET Wallets**

{% tabs %}
{% tab title="Curl" %}

```bash
curl "https://api.abyiss.com/v2/octane/paymentMethods/wallets?apiKey=YOUR_API_KEY_HERE"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = 'https://api.abyiss.com/v2/octane/paymentMethods/wallets?apiKey=YOUR_API_KEY_HERE'

response = requests.get(url)

print(response.status_code)  # This will print the status code of the response
print(response.json())  # This will print the response content as JSON
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const url = 'https://api.abyiss.com/v2/octane/paymentMethods/wallets?apiKey=YOUR_API_KEY_HERE';

fetch(url)
  .then(response => {
    if (!response.ok) {
      throw new Error('Network response was not ok');
    }
    return response.json();
  })
  .then(data => {
    console.log(data); // Handle the response data
  })
  .catch(error => {
    console.error('There has been a problem with your fetch operation:', error);
  });
```

{% endtab %}
{% endtabs %}

## **Wallets Response Object**

{% tabs %}
{% tab title="POST Wallets" %}
Example URL: <https://api.abyiss.com/v2/octane/paymentMethods/wallets?apiKey=>

```json
{
  "id": "wal-123456785",
  "userId": "usr-123456788",
  "address": "some-addy",
  "blockchain": "some-chain",
  "createdAt": "2024-02-02T02:09:55.963",
  "updatedAt": "2024-02-02T02:09:55.958"
}
```

{% endtab %}

{% tab title="Get Wallets" %}
Example URL: <https://api.abyiss.com/v2/octane/paymentMethods/wallets?apiKey=>

```json
[
  {
    "id": "wal-123456788",
    "userId": "usr-123456788",
    "address": "someAddress",
    "blockchain": "ethereum",
    "createdAt": "2024-01-30T15:06:08.568",
    "updatedAt": "2024-01-30T15:06:08.563"
  },
  {
    "id": "wal-123456785",
    "userId": "usr-123456788",
    "address": "some-addy",
    "blockchain": "some-chain",
    "createdAt": "2024-02-02T02:09:55.963",
    "updatedAt": "2024-02-02T02:09:55.958"
  }
]
```

{% endtab %}

{% tab title="Get Wallet by Id" %}
Example URL: <https://api.abyiss.com/v2/octane/paymentMethods/wallets/wal-123456785?apiKey=>

```json
{
  "id": "wal-123456785",
  "userId": "usr-123456788",
  "address": "some-addy",
  "blockchain": "some-chain",
  "createdAt": "2024-02-02T02:09:55.963",
  "updatedAt": "2024-02-02T02:09:55.958"
}
```

{% endtab %}
{% endtabs %}

## Wallets Response Attributes

<table><thead><tr><th width="259.3333333333333">Attribute Name</th><th>Data Type</th><th>Description</th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Wallet Id for the user.</td></tr><tr><td>userId</td><td>string</td><td>Unique user Id.</td></tr><tr><td>address</td><td>string</td><td>The crypto wallet address.</td></tr><tr><td>blockchain</td><td>string</td><td>The blockchain the wallet is on.</td></tr><tr><td>createdAt</td><td>string</td><td>The timestamp the wallet was updated at.</td></tr><tr><td>updatedAt</td><td>string</td><td>The last timestamp the wallet was updated at.</td></tr></tbody></table>


# Subaccounts

The Octane Subaccounts API allows you to manage and retrieve information about subaccounts associated with your master account.

{% hint style="danger" %}
**The Endpoint is in Alpha**
{% endhint %}

Subaccounts are a way to create and manage user accounts under a master account. They can be interacted with using the master account's API key.

* **Subaccount:**
  * A subaccount is specified via the `userId` field in the request body or request query, serving as another part of the apiKey.
  * The master account can interact with subaccount payment methods and transactions.
  * The master account cannot interact with subaccounts of a subaccount.
  * Each subaccount can only have one master account.

## Subaccounts API Endpoints

## Post Subaccount

<mark style="color:green;">`POST`</mark> `https://api.abyiss.com/v2/octane/subaccounts`

Returns a 201 status code upon successful query. Then returns the successful account created.

#### Headers

| Name                                     | Type   | Description   |
| ---------------------------------------- | ------ | ------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Blockchain ID |

#### Request Body

| Name                                    | Type   | Description                              |
| --------------------------------------- | ------ | ---------------------------------------- |
| name<mark style="color:red;">\*</mark>  | string | User name including first and last name. |
| email<mark style="color:red;">\*</mark> | string | The users email address.                 |

{% tabs %}
{% tab title="201: Created Success" %}

```json
{
    "newSubAccountId": "usr-123456790"
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## Get Subaccounts

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/octane/subaccounts`

Returns an array of all the accounts for an associated `apiKey`.

#### Headers

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```json
[{
  "id": "usr-123456790",
  "email": "test@account.com",
  "name": "subAccountName",
  "createdAt": "2023-12-10T00:46:14.786",
  "updatedAt": "2023-12-10T00:46:14.783"
},{
  "id": "usr-123457800",
  "email": "zeekdonuts@gmail.com",
  "name": "Zeek Zubert",
  "createdAt": "2023-12-10T02:18:32.022",
  "updatedAt": "2023-12-10T02:18:32.018"
}]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## Get Subaccount by ID

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/octane/subaccounts/{accountId}`

Returns an object for the `accountId`for an associated `apiKey`.

#### Query Parameters

| Name                                        | Type   | Description |
| ------------------------------------------- | ------ | ----------- |
| accountId<mark style="color:red;">\*</mark> | string | Order ID    |

#### Headers

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
  "id": "usr-123456790",
  "email": "test@account.com",
  "name": "subAccountName",
  "createdAt": "2023-12-10T00:46:14.786",
  "updatedAt": "2023-12-10T00:46:14.783"
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## **Copy & Paste Code**

**POST Subaccounts**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -X POST \
  -H "Content-Type: application/json" \
  -d '{
    "api-key": "dev-api-key",
    "subAccount": {
      "name": "Zeek Zubert",
      "email": "zeekdonuts@gmail.com"
    }
  }' \
  https://api.abyiss.com/v2/octane/subaccounts
```

{% endtab %}

{% tab title="Python" %}

```python
import requests
import json

url = "https://api.abyiss.com/v2/octane/subaccounts"
headers = {
    "Content-Type": "application/json"
}

subaccount_data = {
    "api-key": "dev-api-key",
    "subAccount": {
        "name": "Zeek Zubert",
        "email": "zeekdonuts@gmail.com"
    }
}

response = requests.post(url, headers=headers, data=json.dumps(subaccount_data))

print(response.status_code)
print(response.json())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const axios = require('axios');

const url = 'https://api.abyiss.com/v2/octane/subaccounts';
const headers = {
    'Content-Type': 'application/json'
};

const subaccountData = {
    'api-key': 'dev-api-key',
    'subAccount': {
        'name': 'Zeek Zubert',
        'email': 'zeekdonuts@gmail.com'
    }
};

axios.post(url, subaccountData, { headers })
    .then(response => {
        console.log(response.status);
        console.log(response.data);
    })
    .catch(error => {
        console.error(error.response.status);
        console.error(error.response.data);
    });
```

{% endtab %}
{% endtabs %}

**GET Subaccounts**

{% tabs %}
{% tab title="Curl" %}

```bash
curl "https://api.abyiss.com/v2/octane/subaccounts?apiKey=YOUR_API_KEY_HERE"
```

{% endtab %}

{% tab title="Python" %}

```python
import requests

url = 'https://api.abyiss.com/v2/octane/subaccounts?apiKey=YOUR_API_KEY_HERE'

response = requests.get(url)

print(response.status_code)  # This will print the status code of the response
print(response.json())  # This will print the response content as JSON
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
const url = 'https://api.abyiss.com/v2/octane/subaccounts?apiKey=YOUR_API_KEY_HERE';

fetch(url)
  .then(response => {
    if (!response.ok) {
      throw new Error('Network response was not ok');
    }
    return response.json();
  })
  .then(data => {
    console.log(data); // Handle the response data
  })
  .catch(error => {
    console.error('There has been a problem with your fetch operation:', error);
  });
```

{% endtab %}
{% endtabs %}

## Subaccounts **Response Object**

{% tabs %}
{% tab title="POST Subaccounts" %}
Example URL: <https://api.abyiss.com/v2/octane/subaccounts?apiKey=>

```json
{
    "newSubAccountId": "usr-123456790"
}
```

{% endtab %}

{% tab title="Get Subaccounts" %}
Example URL: <https://api.abyiss.com/v2/octane/subaccounts?apiKey=>

```json
[{
  "id": "usr-123456790",
  "email": "test@account.com",
  "name": "subAccountName",
  "createdAt": "2023-12-10T00:46:14.786",
  "updatedAt": "2023-12-10T00:46:14.783"
},{
  "id": "usr-123457800",
  "email": "zeekdonuts@gmail.com",
  "name": "Zeek Zubert",
  "createdAt": "2023-12-10T02:18:32.022",
  "updatedAt": "2023-12-10T02:18:32.018"
}]
```

{% endtab %}

{% tab title="Get Subaccount by Id" %}
Example URL: <https://api.abyiss.com/v2/octane/subaccounts/usr-123457800?apiKey=>

```json
{
  "id": "usr-123457800",
  "email": "zeekdonuts@gmail.com",
  "name": "Zeek Zubert",
  "createdAt": "2023-12-10T02:18:32.022",
  "updatedAt": "2023-12-10T02:18:32.018"
}
```

{% endtab %}
{% endtabs %}

## Subaccounts Response Attributes

| Attribute Name | Data Type | Description                                         |
| -------------- | --------- | --------------------------------------------------- |
| id             | string    | Unique user id.                                     |
| email          | string    | User email address.                                 |
| name           | string    | User first and last name.                           |
| createdAt      | string    | The timestamp the user account was created.         |
| updatedAt      | string    | The last timestamp the user account was updated at. |


# KYC (Know Your Customer)

Request access by emailing support\@abyiss.com.

{% hint style="danger" %}
**The endpoint is in Alpha. Request access by emailing** [**support@abyiss.com**](mailto:support@abyiss.com)**.**
{% endhint %}

KYC (Know Your Customer) APIs for Octane: Crypto On and Off Ramp. This endpoint allows you to post and get your Know Your Customer (KYB) and Know Your Business (KYB) information and status.&#x20;

Currently in early alpha. Initial usage will be rolled out one exchange at a time. Contact our support team or email us at [support@abyiss.com](<mailto:support@abyiss.com >) to request access.


# Introduction

Centralized crypto exchanges REST APIs and WebSockets documentation.

Welcome to the Abyiss Centralized Exchange API Documentation! This section of our documentation covers everything related to centralized exchanges, including supported exchanges, REST APIs, Websockets, market data, reference data, historical data, pagination, return types, and more.

To get started, you'll need to create an account and API key with Abyiss. This will allow you to access our endpoints and start building your applications with our centralized exchange data. You can create an account by [clicking the link here](https://abyiss.com/signin), and learn more about [API Keys and Authorization](/introduction/api-architecture/api-keys-authentication) by clicking the link provided here.

Some of the important endpoints available through our API include:

* [Market Data](/crypto-api/rest-apis/current-price): Access market data from our supported exchanges
* [Reference Data](/crypto-api/references): Retrieve information about supported exchanges, trading pairs, and more
* [Websockets](/crypto-api/websockets): Subscribe to real-time updates on market data and other information
* [Historical Data](/crypto-api/references/historical-data): Retrieve historical market data for analysis and backtesting
* [Pagination](/crypto-api/references/pagination): Learn how to increase API response data limit using pagination
* [Return Types](/crypto-api/references/return-types): Understand the different data formats and structures returned by our API endpoints

We hope this documentation will serve as a helpful resource as you work with our centralized exchange API. If you have any questions or need assistance, please don't hesitate to contact our [support team](https://abyiss.com/contact).


# References

Centralized exchange API reference documentation.

{% hint style="info" %}
**Abyiss Centralized Exchange API Reference Documentation**&#x20;
{% endhint %}

Welcome to the Abyiss Centralized Exchange API Reference Documentation. Here, you can learn about the unique characteristics and core concepts behind our centralized exchanges API.

Please note that you will need an account and API Key to access these endpoints. If you don't have an account yet, you can create one by [clicking here](https://abyiss.com/signin). To learn more about API Keys and Authorization, please [click here](/introduction/api-architecture/api-keys-authentication).

The following topics are covered in this documentation:

* [Supported Exchanges](/crypto-api/references/supported-exchanges)
* [Historical Data](/crypto-api/references/historical-data)
* [Pagination](/crypto-api/references/pagination)
* [Return Types](/crypto-api/references/return-types)

If you have any questions or need further assistance, please don't hesitate to contact our support team at <support@abyiss.com>.


# Supported Exchanges

Centralized exchanges supported on Abyiss.

At Abyiss, we currently support over 111 centralized cryptocurrency exchanges and trading APIs, and we're constantly adding more to the list. For an up-to-date and accurate list of the exchanges we support, please refer to the [exchange documentation linked here](https://abyiss.com/exchanges).

If you have any questions or concerns about using any of these exchanges with our platform, please don't hesitate to contact our support team at <support@abyiss.com>.

<table><thead><tr><th width="185.6153846153846">Name</th><th width="150">ID</th><th width="182.8707127193899">Country</th><th>API Version</th></tr></thead><tbody><tr><td>AAX</td><td>aax</td><td>Malta</td><td>V2</td></tr><tr><td>AOFEX</td><td>aofex</td><td>UK</td><td>*</td></tr><tr><td>AscendEX</td><td>ascendex</td><td>Singapore</td><td>V2</td></tr><tr><td>Bequant</td><td>bequant</td><td>Malta</td><td>V2</td></tr><tr><td>Bibox</td><td>bibox</td><td>South Korea</td><td>V1</td></tr><tr><td>BigONE</td><td>bigone</td><td>China</td><td>V3</td></tr><tr><td>Binance</td><td>binance</td><td>Japan</td><td>*</td></tr><tr><td>Binance COIN-M</td><td>binancecoinm</td><td>Japan</td><td>*</td></tr><tr><td>Binance US</td><td>binanceus</td><td>US</td><td>*</td></tr><tr><td>Binance USDⓈ-M</td><td>binanceusdm</td><td>Japan</td><td>*</td></tr><tr><td>Bit2C</td><td>bit2c</td><td>Israel</td><td>*</td></tr><tr><td>Bitbank</td><td>bitbank</td><td>Japan</td><td>1</td></tr><tr><td>BitBay</td><td>bitBay</td><td>Malta</td><td>*</td></tr><tr><td>Bitbns</td><td>bitbns</td><td>India</td><td>V2</td></tr><tr><td>Bitcoin.com</td><td>bitcoincom</td><td>Saint Kitts and Nevis</td><td>V2</td></tr><tr><td>Bitfinex</td><td>bitfinex</td><td>British Virgin Islands</td><td>V1</td></tr><tr><td>Bitfinex</td><td>bitfinex2</td><td>British Virgin Islands</td><td>V2</td></tr><tr><td>BitFlyer</td><td>bitflyer</td><td>Japan</td><td>V1</td></tr><tr><td>Bitforex</td><td>bitforex</td><td>China</td><td>V1</td></tr><tr><td>Bitget</td><td>bitget</td><td>Singapore</td><td>V3</td></tr><tr><td>Bithumb</td><td>bithumb</td><td>South Korea</td><td>*</td></tr><tr><td>BitMart</td><td>bitmart</td><td>South Korea</td><td>V1</td></tr><tr><td>BitMEX</td><td>bitmex</td><td>Seychelles</td><td>V1</td></tr><tr><td>Bitpanda Pro</td><td>bitpanda</td><td>Austria</td><td>V1</td></tr><tr><td>Bitso</td><td>bitso</td><td>Mexico</td><td>V3</td></tr><tr><td>Bitstamp</td><td>bitstamp</td><td>UK</td><td>V2</td></tr><tr><td>Bitstamp</td><td>bitstamp1</td><td>UK</td><td>V2</td></tr><tr><td>Bittrex</td><td>bittrex</td><td>US</td><td>V3</td></tr><tr><td>Bitvavo</td><td>bitvavo</td><td>Netherlands</td><td>V2</td></tr><tr><td>BL3P</td><td>bl3p</td><td>Netherlands</td><td>V1</td></tr><tr><td>BTC-Alpha</td><td>btcalpha</td><td>US</td><td>V1</td></tr><tr><td>BtcBox</td><td>btcbox</td><td>Japan</td><td>V1</td></tr><tr><td>BTC Markets</td><td>btcmarkets</td><td>Australia</td><td>V3</td></tr><tr><td>BTC Trade UA</td><td>btctradeua</td><td>Ukraine</td><td>*</td></tr><tr><td>BTCTurk</td><td>btcturk</td><td>Turkey</td><td>*</td></tr><tr><td>Buda</td><td>buda</td><td>Argentina</td><td>V2</td></tr><tr><td>BW</td><td>bw</td><td>China</td><td>V1</td></tr><tr><td>Bybit</td><td>bybit</td><td>British Virgin Islands</td><td>V2</td></tr><tr><td>ByteTrade</td><td>bytetrade</td><td>Hong Kong</td><td>*</td></tr><tr><td>CDAX</td><td>cdax</td><td>Russia</td><td>V1</td></tr><tr><td>CEX.IO</td><td>cex</td><td>Russia</td><td>*</td></tr><tr><td>Coinbase</td><td>coinbase</td><td>US</td><td>V2</td></tr><tr><td>Coinbase Pro</td><td>coinbasepro</td><td>US</td><td>*</td></tr><tr><td>Coincheck</td><td>coincheck</td><td>Japan</td><td>*</td></tr><tr><td>CoinEgg</td><td>coinegg</td><td>China</td><td>*</td></tr><tr><td>CoinEx</td><td>coinex</td><td>China</td><td>V1</td></tr><tr><td>CoinFalcon</td><td>coinfalcon</td><td>UK</td><td>V1</td></tr><tr><td>CoinMarketCap</td><td>coinmarketcap</td><td>US</td><td>V1</td></tr><tr><td>CoinMate</td><td>coinmate</td><td>Slovakia</td><td>*</td></tr><tr><td>CoinOne</td><td>coinone</td><td>South Korea</td><td>V2</td></tr><tr><td>CoinSpot</td><td>coinspot</td><td>Australia</td><td>*</td></tr><tr><td>CREX24</td><td>crex24</td><td>Estonia</td><td>V2</td></tr><tr><td>Currency.com</td><td>currencycom</td><td>Belarus</td><td>V1</td></tr><tr><td>Delta Exchange</td><td>delta</td><td>St. Vincent &#x26; Grenadines</td><td>V2</td></tr><tr><td>Deribit</td><td>deribit</td><td>Netherlands</td><td>V2</td></tr><tr><td>DigiFinex</td><td>digifinex</td><td>Singapore</td><td>V3</td></tr><tr><td>EQONEX</td><td>eqonex</td><td>Singapore</td><td>*</td></tr><tr><td>EQUOS</td><td>equos</td><td>Singapore</td><td>*</td></tr><tr><td>EXMO</td><td>exmo</td><td>Lithuania</td><td>V1.1</td></tr><tr><td>EXX</td><td>exx</td><td>China</td><td>*</td></tr><tr><td>FlowBTC</td><td>flowbtc</td><td>Brazil</td><td>V1</td></tr><tr><td>FTX</td><td>ftx</td><td>Hong Kong</td><td>*</td></tr><tr><td>Gate.io</td><td>gateio</td><td>South Korea</td><td>V4</td></tr><tr><td>Gemini</td><td>gemini</td><td>US</td><td>V1</td></tr><tr><td>HitBTC</td><td>hitbtc</td><td>Hong Kong</td><td>V2</td></tr><tr><td>HollaEx</td><td>hollaex</td><td>South Korea</td><td>V2</td></tr><tr><td>Huobi</td><td>huobi</td><td>China</td><td>V1</td></tr><tr><td>Huobi Japan</td><td>huobijp</td><td>Japan</td><td>V1</td></tr><tr><td>Huobi</td><td>huobipro</td><td>huobipro</td><td>*</td></tr><tr><td>IDEX</td><td>idex</td><td>UK</td><td>V3</td></tr><tr><td>Independent Reserve</td><td>independentreserve</td><td>Australia</td><td>*</td></tr><tr><td>INDODAX</td><td>indodax</td><td>Indonesia</td><td>V2.0</td></tr><tr><td>itBit</td><td>itbit</td><td>US</td><td>V1</td></tr><tr><td>Kraken</td><td>kraken</td><td>US</td><td>0</td></tr><tr><td>KuCoin</td><td>kucoin</td><td>Seychelles</td><td>V2</td></tr><tr><td>Kuna</td><td>kuna</td><td>Ukraine</td><td>V2</td></tr><tr><td>Latoken</td><td>latoken</td><td>Cayman Islands</td><td>V2</td></tr><tr><td>LBank</td><td>lbank</td><td>China</td><td>V1</td></tr><tr><td>Liquid</td><td>liquid</td><td>China</td><td>V2</td></tr><tr><td>luno</td><td>luno</td><td>Singapore</td><td>V1</td></tr><tr><td>Lykke</td><td>lykke</td><td>Switzerland</td><td>V1</td></tr><tr><td>Mercado Bitcoin</td><td>mercado</td><td>Brazil</td><td>V3</td></tr><tr><td>MEXC Global</td><td>mexc</td><td>Seychelles</td><td>V2</td></tr><tr><td>NDAX</td><td>ndax</td><td>US</td><td>*</td></tr><tr><td>NovaDAX</td><td>novadax</td><td>Brazil</td><td>V1</td></tr><tr><td>OceanEx</td><td>oceanex</td><td>China</td><td>V1</td></tr><tr><td>OKCoin</td><td>okcoin</td><td>China</td><td>V3</td></tr><tr><td>OKEX</td><td>okex</td><td>China</td><td>V5</td></tr><tr><td>OKEX</td><td>okex3</td><td>China</td><td>V3</td></tr><tr><td>OKEX</td><td>okex5</td><td>China</td><td>*</td></tr><tr><td>Paymium</td><td>paymium</td><td>EU</td><td>V1</td></tr><tr><td>Phemex</td><td>phemex</td><td>China</td><td>V1</td></tr><tr><td>Poloniex</td><td>poloniex</td><td>US</td><td>*</td></tr><tr><td>ProBit</td><td>probit</td><td>Seychelles</td><td>V1</td></tr><tr><td>qTrade</td><td>qtrade</td><td>US</td><td>V1</td></tr><tr><td>Ripio</td><td>ripio</td><td>Argentina</td><td>V1</td></tr><tr><td>STEX</td><td>stex</td><td>Estonia</td><td>V3</td></tr><tr><td>TheRockTrading</td><td>therock</td><td>Malta</td><td>V1</td></tr><tr><td>TideBit</td><td>tidebit</td><td>Hong Kong</td><td>V2</td></tr><tr><td>Tidex</td><td>tidex</td><td>UK</td><td>V3</td></tr><tr><td>TimeX</td><td>timex</td><td>Australia</td><td>V1</td></tr><tr><td>Upbit</td><td>upbit</td><td>South Korea</td><td>V1</td></tr><tr><td>VCC Exchange</td><td>vcc</td><td>Vietnam</td><td>V3</td></tr><tr><td>Waves.Exchange</td><td>wavesexchange</td><td>Switzerland</td><td>*</td></tr><tr><td>WhiteBit</td><td>whitebit</td><td>Estonia</td><td>V2</td></tr><tr><td>Xena Exchange</td><td>xena</td><td>St. Vincent &#x26; Grenadines</td><td>*</td></tr><tr><td>YoBit</td><td>yobit</td><td>Russia</td><td>V3</td></tr><tr><td>Zaif</td><td>zaif</td><td>Japan</td><td>V1</td></tr><tr><td>ZB</td><td>zb</td><td>China</td><td>V1</td></tr></tbody></table>


# Historical Data

How to get centralized exchanges historical data and information.

{% hint style="info" %}
**Historical price trends can indicate the future direction of a cryptocurrency**
{% endhint %}

Historical data provides several years of daily historical crypto prices, volumes, trades, and aggregates for each cryptocurrency.

Historical data is exchange specific, so some exchanges provide more historical data than others. If you want to save large amounts of historical data, please [contact us here](mailto:sales@abyiss.com).

## How It Works

Historical data is accessible on the [**`trades`** ](/crypto-api/rest-apis/last-trade)and [**`aggregates`** ](/crypto-api/rest-apis/aggregates-bars)market data endpoints.

To access historical data, use the **`since`** parameter. The **`since`** parameter accepts a Unix timestamp from where you want the data to start.

To help convert Unix timestamps we use [https://www.unixtimestamp.com](https://www.unixtimestamp.com/).

| Parameter | Data Type | Description                                           |
| --------- | --------- | ----------------------------------------------------- |
| `since`   | Int       | Unix Timestamp from where you want the time to start. |

## Historical Data

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/{exchange}/{market}/trades?since={Unix Timestamp}`

Returns an object with historical trade data.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description                                                             |
| ---------------------------------------- | ------ | ----------------------------------------------------------------------- |
| since<mark style="color:red;">\*</mark>  | int    | Unix Timestamp from where you want the data to start. (Historical Data) |
| limit                                    | int    | Number of results per request. Maximum 50,000. (default 200)            |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key                                                     |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "binance",
    "market": "BTC/USDT",
    "trades": [
        {
            "id": "2214",
            "timestamp": "1503000000087",
            "price": 4307.56,
            "size": 3.789232,
            "cost": 16322.344193920002,
            "side": "buy"
        },
        {
            "id": "2215",
            "timestamp": "1503000038104",
            "price": 4325.23,
            "size": 0.229059,
            "cost": 990.73285857,
            "side": "buy"
        },
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Response Object

**Trades** Example URL:[ https://api.abyiss.com/v2/cex/binance/btc-usdt/trades?since=1503000000000\&limit=100\&apiKey=](https://api.abyiss.com/v2/cex/binance/btc-usdt/trades?since=1503000000000\&limit=100\&apiKey=)

```json
{
    "exchange": "binance",
    "market": "BTC/USDT",
    "trades": [
        {
        "id": "2214",
        "timestamp": "1503000000087",
        "price": 4307.56,
        "size": 3.789232,
        "cost": 16322.344193920002,
        "side": "buy"
        },
}
```

**Aggregates** Example URL: <https://api.abyiss.com/v2/cex/binance/btc-usdt/aggregates/1h?since=1503000000000&limit=100&apiKey=>

```json
{
    "exchange": "binance",
    "market": "BTC/USDT",
    "aggregates": [
        {
        "t": 1503000000000,
        "o": 4307.56,
        "h": 4354.84,
        "l": 4258.56,
        "c": 4346.74,
        "v": 48.975472
        },
}
```


# Pagination

How to increase API data limit for centralized exchanges using pagination.

{% hint style="info" %}
**Get `/trades?limit=500`**
{% endhint %}

Abyiss implements cursor pagination for all REST requests that return arrays of data. This includes endpoints such as `/trades`, `/aggregates`, and `/orders`. By default, these endpoints return the latest items. To retrieve more results per page, you can specify the `limit` parameter.

The `limit` parameter determines the number of results to be included in each page of the response. It's important to note that the maximum pagination limit may vary depending on the specific exchange. Some exchanges may support higher pagination limits than others.

## Example

To fetch a page of trades with a limit of 500 results, you can use the following API request:

```bash
GET /trades?limit=500
```

**Example URL:**

<https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/trades?limit=500&apiKey=YOUR_API_KEY>

## Parameters

<table><thead><tr><th width="150">Parameter</th><th width="211.4">Default</th><th>Description</th></tr></thead><tbody><tr><td>limit</td><td>200</td><td>Number of results per request. Maximum 50,000. (default 200)</td></tr></tbody></table>


# Return Types

Centralized exchange return types and information.

## Timestamps

`"timestamp": "1639333070818"`

Unless otherwise specified, all timestamps from our API are retuned in [Unix ](https://en.wikipedia.org/wiki/Unix_time)time as strings. Make sure you can parse the following Unix format. You can reference Unix timestamp conversion tools if needed [here](https://www.unixtimestamp.com/index.php).&#x20;

## IDs

`"id": "1029807859"`

All identifiers are returned as strings and are exchange specific. Meaning all id's are unique to each individual crypto exchange.&#x20;

To learn more about the id's returned by our API, you will have to research each individual exchanges documentation. Every id has a different meaning on each exchange.

## Nonce

`"nonce": 15624599412`

Nonce are returned as strings and are exchange specific, similar to id's. Meaning all nonce are unique to each individual crypto exchange. To learn more about the nonce returned by our API, you will have to research each individual exchanges documentation.


# REST APIs

Centralized exchange REST APIs documentation.

Welcome to Abyiss Centralized Exchange REST API documentation! This page contains information about the reference data and market data endpoints available for our centralized exchange APIs.

## Authentication

To use our REST API, you'll need an account and an API Key. If you don't have one yet, create an [account with Abyiss](https://abyiss.com/signin) and learn more about [API Keys and Authorization](/introduction/api-architecture/api-keys-authentication) in our Authentication section.

## Endpoints

Our REST API provides access to market data endpoints that contain real-time and historical data about supported exchanges and their symbols. The following data endpoints are available:

* [Current Price](/crypto-api/rest-apis/current-price)
* [Aggregates (Bars)](/crypto-api/rest-apis/aggregates-bars)
* [Trades](/crypto-api/rest-apis/last-trade)
* [Order Books](/crypto-api/rest-apis/order-books)

## Pro Tips for Reading Documentation

To better understand our documentation, here are some pro tips to keep in mind:

* **Be patient**: Take your time to go through the documentation to avoid missing important details.
* **Review terms**: Make sure to familiarize yourself with key terms and definitions used in the documentation.
* **Read slowly**: Read each section of the documentation slowly and carefully to ensure that you understand everything.
* **Reread things**: If you're having trouble understanding a particular section, reread it or consult external resources.
* **Click the drop-down arrows**: Expand the sections and sub-sections to see more detailed information.
* **Read the overviews**: Start with the overviews to get a general idea of the information available in the documentation.
* **Google anything you don't understand**: If you encounter unfamiliar terms or concepts, Google them to learn more.
* **Contact us if you're having trouble**: If you're still having trouble understanding our documentation, don't hesitate to contact our support team for assistance.

That's it! We hope this page helps you understand our REST API better. If you have any questions or concerns, please don't hesitate to contact our [support team](https://abyiss.com/contact).


# Exchanges

Get exchanges endpoint returns all crypto exchanges Abyiss supports.

## Get Exchanges

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/cex/exchanges`

Returns an array of all supported exchanges in the form of market objects.

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
    {
        "name":"Binance",
        "id":"binance"
    },
    {
        "name":"Binance US",
        "id":"binanceus"
    },
    {
        "name":"Coinbase Pro",
        "id":"coinbasepro"
    },
    {
        "name":"BitBay",
        "id":"bitbay"
    }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/exchanges
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey)

exchanges = client.getExchanges()

print(exchanges)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/exchanges?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/exchanges?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/exchanges?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/cex/exchanges?apiKey=>

```json
{
    "name":"Binance",
    "id":"binance"
},
{
    "name":"Coinbase Pro",
    "id":"coinbasepro"
},
```

### Response Attributes

| Attribute Name | Data Type | Description                                |
| -------------- | --------- | ------------------------------------------ |
| name           | string    | The official name of the exchange.         |
| id             | string    | Unique exchange identifier used by Abyiss. |


# Exchanges Count

Get exchanges count returns the number of crypto exchanges Abyiss supports.

## Get Exchange Count

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/cex/exchanges/count`

Returns the number of crypto exchanges Abyiss supports.

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "count": 118
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/exchanges/count
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/cex/exchanges/count?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/exchanges/count?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/exchanges/count?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/exchanges/count?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/cex/exchanges/count?apiKey=>

```json
{
    "count": 118
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                    |
| -------------- | --------- | ---------------------------------------------- |
| count          | integer   | The number of Crypto Exchanges Abyiss supports |


# Exchange Data

Get exchange data returns information about a crypto exchange.

## Get Exchange Data

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/cex/{exchange}`

Returns an object with properties about the exchange.

#### Path Parameters

| Name                                       | Type   | Description                                |
| ------------------------------------------ | ------ | ------------------------------------------ |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "name": "Coinbase Pro",
    "id": "coinbasepro",
    "countries": [
        "US"
    ],
    "hasTrades": true,
    "hasAggregates": true,
    "aggregateTimeframes": {
        "1m": 60,
        "5m": 300,
        "15m": 900,
        "1h": 3600,
        "6h": 21600,
        "1d": 86400
    },
    "url": "https://pro.coinbase.com/",
    "fees": [
        "https://docs.pro.coinbase.com/#fees",
        "https://support.pro.coinbase.com/customer/en/portal/articles/2945310-fees"
    ],
    "docs": "https://docs.pro.coinbase.com",
    "logo": "https://user-images.githubusercontent.com/1294454/41764625-63b7ffde-760a-11e8-996d-a6328fa9347a.jpg"
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/coinbasepro
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey)

exchangeDetails = client.getExchangeDetails("coinbasepro")

print(exchangeDetails)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/coinbasepro?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/coinbasepro?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/coinbasepro?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v2/cex/coinbasepro?apiKey=>&#x20;

```json
{
    "name": "Coinbase Pro",
    "id": "coinbasepro",
    "countries": [
        "US"
    ],
    "hasTrades": true,
    "hasAggregates": true,
    "aggregateTimeframes": {
        "1m": 60,
        "5m": 300,
        "15m": 900,
        "1h": 3600,
        "6h": 21600,
        "1d": 86400
    },
    "url": "https://pro.coinbase.com/",
    "fees": [
        "https://docs.pro.coinbase.com/#fees",
        "https://support.pro.coinbase.com/customer/en/portal/articles/2945310-fees"
    ],
    "docs": "https://docs.pro.coinbase.com",
    "logo": "https://user-images.githubusercontent.com/1294454/41764625-63b7ffde-760a-11e8-996d-a6328fa9347a.jpg"
}
```

### Response Attribute

| Attribute Name      | Data Type          | Description                                                                 |
| ------------------- | ------------------ | --------------------------------------------------------------------------- |
| name                | string             | The official name of the exchange.                                          |
| id                  | string             | Unique identifier used by Abyiss for the exchange.                          |
| countries           | object             | The countries abbreviations the exchange is located in.                     |
| hasTrades           | boolean            | Can query market trades.                                                    |
| hasAggregates       | boolean            | Can query market candle aggregates. (1m, 5m, 15m, 1h, 6h, 1d)               |
| aggregateTimeframes | object             | Timeframes supported for market candle aggregates. (Spot, Derivatives, Dex) |
| url                 | string             | Exchange's official website URL.                                            |
| fees                | object \|\| string | The URL to for Exchange Fee Structure.                                      |
| docs                | string             | The URL for the Exchange Documentation.                                     |
| logo                | string             | The URL to the Exchange Logos.                                              |


# Exchange Status

Get exchange status returns the current status of a crypto exchange.

## Get Exchange Status

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/cex/{exchange}/status`

Returns an object with properties that describe an exchange's status.

#### Path Parameters

| Name                                       | Type   | Description                                |
| ------------------------------------------ | ------ | ------------------------------------------ |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss. |

#### Query Parameters

| Name   | Type   | Description         |
| ------ | ------ | ------------------- |
| apiKey | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "status":"ok",
    "updated":1634929487916
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/coinbasepro/status
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey)

exchangeStatus = client.getExchangeStatus("coinbasepro")

print(exchangeStatus)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/coinbasepro/status?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/coinbasepro/status?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```javascript
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/coinbasepro/status?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object&#x20;

Example URL: <https://api.abyiss.com/v2/cex/coinbasepro/status?apiKey=>

```json
{
    "status":"ok",
    "updated":1634929487916
}
```

### Response Attribute

| Attribute Name | Data Type | Description                                                      |
| -------------- | --------- | ---------------------------------------------------------------- |
| status         | string    | Status of the exchange. 'ok' is good.                            |
| updated        | integer   | Unix timestamp of the last time the exchange status was updated. |


# Exchange Markets

Get exchange markets returns all crypto pairs on a crypto exchange.

## Get Exchange Markets

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/cex/{exchange}/markets`

Returns an array of all crypto pair ids on the exchange.

#### Path Parameters

| Name                                       | Type   | Description                                |
| ------------------------------------------ | ------ | ------------------------------------------ |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
    "OGN/BTC",
    "REQ/BTC",
    "KEEP/USD",
    "AAVE/USD",
    "SKL/GBP",
    "MIR/EUR",
    "FORTH/EUR",
    "DOT/USDT"
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/coinbasepro/markets
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey) 

exchangeMarkets = client.getExchangeMarkets("coinbasepro")

print(exchangeMarkets)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/coinbasepro/markets?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/coinbasepro/markets?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/coinbasepro/markets?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v2/cex/coinbasepro/markets?apiKey=>

```json
[
    "BTC/USD",
    "ETH/USD",
    "DOGE/USD",
    "DOT/USDT"
]
```

### Response Attribute

| Attribute Name | Data Type | Description                                         |
| -------------- | --------- | --------------------------------------------------- |
| pair id        | string    | Unique Crypto Pair identifier used by the exchange. |


# Market Details

Get market details returns information about a crypto pair.

## Get Market Details

<mark style="color:blue;">`GET`</mark> `https://api.abyis.com/v2/cex/{exchange}/{market}`

Returns an object with properties about the crypto pair.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange":"coinbasepro",
    "symbol":"BTC/USD",
    "id":"BTC-USD",
    "active":true,
    "base":"BTC",
    "quote":"USD",
    "percentage":true,
    "taker":0.005,
    "maker":0.005,
    "type":"spot"
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey) 

exchangeMarketDetails = client.getMarketDetails("coinbasepro", "BTC-USD")

print(exchangeMarketDetails)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD?apiKey=>

```json
{
    "exchange":"coinbasepro",
    "symbol":"BTC/USD",
    "id":"BTC-USD",
    "active":true,
    "base":"BTC",
    "quote":"USD",
    "percentage":true,
    "taker":0.005,
    "maker":0.005,
    "type":"spot"
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                                                  |
| -------------- | --------- | ---------------------------------------------------------------------------- |
| exchange       | string    | Unique identifier used by Abyiss for the exchange.                           |
| symbol         | string    | The symbol of the market.                                                    |
| id             | string    | Unique identifier used by Abyiss for the market.                             |
| active         | boolean   | Whether the market is active on the exchange.                                |
| base           | string    | The base of the market. eg: The quantity that is bought.                     |
| quote          | string    | The quote of the market. eg: The currency being compared.                    |
| percentage     | boolean   | Whether the taker and maker fee rate is a multiplier or a fixed flat amount. |
| taker          | float     | Taker fee rate, 0.002 = 0.2%.                                                |
| maker          | float     | Maker fee rate, 0.0016 = 0.16%.                                              |
| type           | string    | Exchange type that the market is listed on.                                  |


# Current Price

Get current price returns the real-time price of a crypto pair.

## Get Current Price

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/cex/{exchange}/{market}/currentprice`

Returns an object with the real-time price of a crypto pair.&#x20;

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | sring  | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "timestamp": "1644510051396",
    "price": 45202.18
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/currentprice
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/currentprice?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/currentprice?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/currentprice?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/currentprice?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/currentprice?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "timestamp": "1644510051396",
    "price": 45202.18
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                        |
| -------------- | --------- | -------------------------------------------------- |
| exchange       | string    | Unique identifier used by Abyiss for the exchange. |
| market         | string    | Unique identifier used by the exchange for ticker. |
| timestamp      | string    | Unix timestamp of the current price.               |
| price          | float     | The latest price of the crypto asset.              |


# Aggregates (Bars)

Get aggregates returns candlestick bars for a crypto pair.

## Get Aggregates (Bars)

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/cex/{exchange}/{market}/aggregates/{aggregate size}`

Returns an object with the latest aggregates or candlesticks of a crypto pair.

#### Path Parameters

| Name                                             | Type   | Description                                                        |
| ------------------------------------------------ | ------ | ------------------------------------------------------------------ |
| exchange<mark style="color:red;">\*</mark>       | string | Unique exchange identifier used by Abyiss.                         |
| market<mark style="color:red;">\*</mark>         | string | Unique Crypto Pair identifier used by the exchange.                |
| aggregate size<mark style="color:red;">\*</mark> | string | Aggregate bar or candlestick time frame. (1m, 5m, 15m, 1h, 6h, 1d) |

#### Query Parameters

| Name                                     | Type   | Description                                                             |
| ---------------------------------------- | ------ | ----------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key                                                     |
| limit                                    | string | Number of results per request. Maximum 50,000. (default 200)            |
| since                                    | number | Unix Timestamp from where you want the data to start. (Historical Data) |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "aggregates": [
        {
        "t": 1644496320000,
        "o": 44714.52,
        "h": 44770.05,
        "l": 44714.52,
        "c": 44751.17,
        "v": 2.88395739
        },
        {
        "t": 1644496380000,
        "o": 44752,
        "h": 44753.14,
        "l": 44713.07,
        "c": 44747.05,
        "v": 10.80901469
        },
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/aggregates/1m
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey)

aggregates = client.aggregates("coinbasepro", "BTC-USD", "1m", "250")

print(aggregates)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/aggregates/1m?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/aggregates/1m?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```javascript
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/aggregates/1m?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/aggregates/1m?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "aggregates": [
        {
        "t": 1644496320000,
        "o": 44714.52,
        "h": 44770.05,
        "l": 44714.52,
        "c": 44751.17,
        "v": 2.88395739
        },
}
```

### Response Attributes <a href="#response-attributes" id="response-attributes"></a>

| Attribute Name | Data Type | Description                                         |
| -------------- | --------- | --------------------------------------------------- |
| exchange       | string    | Unique identifier used by Abyiss for the exchange.  |
| market         | string    | Unique identifier used by the exchange for ticker.  |
| aggregates     | array     | Array of Aggregates                                 |
| t              | integer   | Unix timestamp at the start of the aggregate.       |
| o              | float     | The open or first price of the aggregate.           |
| h              | float     | The highest price of the aggregate.                 |
| l              | float     | The lowest price of the aggregate.                  |
| c              | float     | The close or last price of the aggregate.           |
| v              | float     | The volume or quantity traded within the aggregate. |


# Last Aggregate

Get last aggregate returns the latest aggregate bar for a crypto pair.

## Get Last Aggregate

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/cex/{exchange}/{market}/lastaggregate/{aggregate size}`

Returns an object with the latest aggregate or candlestick of a crypto pair.

#### Path Parameters

| Name                                             | Type   | Description                                                        |
| ------------------------------------------------ | ------ | ------------------------------------------------------------------ |
| exchange<mark style="color:red;">\*</mark>       | string | Unique exchange identifier used by Abyiss.                         |
| market<mark style="color:red;">\*</mark>         | string | Unique Crypto Pair identifier used by the exchange.                |
| aggregate size<mark style="color:red;">\*</mark> | string | Aggregate bar or candlestick time frame. (1m, 5m, 15m, 1h, 6h, 1d) |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "timeframe": "1m",
    "t": 1644515400000,
    "o": 45203.6,
    "h": 45216.72,
    "l": 45183.93,
    "c": 45200.37,
    "v": 5.43995508
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/lastaggregate/1m?apiKey=*
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/lastaggregate/1m?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/lastaggregate/1m?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/lastaggregate/1m?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/lastaggregate/1m?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/lastaggregate/1m?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "timeframe": "1m",
    "t": 1644515400000,
    "o": 45203.6,
    "h": 45216.72,
    "l": 45183.93,
    "c": 45200.37,
    "v": 5.43995508
}
```

### Response Attributes&#x20;

| Attribute Name | Data Type | Description                                                        |
| -------------- | --------- | ------------------------------------------------------------------ |
| exchange       | string    | Unique identifier used by Abyiss for the exchange.                 |
| market         | string    | Unique identifier used by the exchange for ticker.                 |
| timeframe      | string    | Aggregate bar or candlestick time frame. (1m, 5m, 15m, 1h, 6h, 1d) |
| t              | integer   | Unix timestamp at the start of the aggregate.                      |
| o              | float     | The open or first price of the aggregate.                          |
| h              | float     | The highest price of the aggregate.                                |
| l              | float     | The lowest price of the aggregate.                                 |
| c              | float     | The close or last price of the aggregate.                          |
| v              | float     | The volume or quantity traded within the aggregate.                |


# Trades

Get last aggregate returns the latest aggregate bar for a crypto pair.

## Get Trades

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/cex/{exchange}/{market}/trades`

Returns an object with recent trades for a crypto pair on an exchange.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description                                                             |
| ---------------------------------------- | ------ | ----------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key                                                     |
| limit                                    | string | Number of results per request. Maximum 50,000. (default 200)            |
| since                                    | number | Unix Timestamp from where you want the data to start. (Historical Data) |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "trades": [
        {
            "id": "279352169",
            "timestamp": "1644524462830",
            "price": 44322.55,
            "size": 0.02209576,
            "cost": 979.340427388,
            "side": "buy"
        },
        {
            "id": "279352170",
            "timestamp": "1644524463216",
            "price": 44322.55,
            "size": 0.00030296,
            "cost": 13.427959748000001,
            "side": "buy"
        },
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/trades
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY"
client = Abyiss.Client(apiKey)

trades = client.trades("coinbasepro", "BTC-USD", "250")

print(trades)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/trades?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/trades?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/trades?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/trades?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "trades": [
        {
            "id": "279352169",
            "timestamp": "1644524462830",
            "price": 44322.55,
            "size": 0.02209576,
            "cost": 979.340427388,
            "side": "buy"
        },
    ]
}
```

### Response Attributes

<table><thead><tr><th width="150">Attribute Name</th><th width="150">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>exchange</td><td>string</td><td>The exchange id the trade occurred on.</td></tr><tr><td>market</td><td>string</td><td>The crypto pair that was traded.</td></tr><tr><td>trades</td><td>array</td><td>An array of trades</td></tr><tr><td>id</td><td>string</td><td>The exchange specific unique id of the trade.</td></tr><tr><td>timestamp</td><td>string</td><td>The Unix timestamp that trade was executed.</td></tr><tr><td>price</td><td>float</td><td>The quote currency price of the market.</td></tr><tr><td>size</td><td>float</td><td>The quantity traded.</td></tr><tr><td>cost</td><td>float</td><td>The quote cost: (size * price).</td></tr><tr><td>side</td><td>string</td><td>Whether the trade was a buy or sell.</td></tr></tbody></table>


# Last Trade

Get last trade returns the most recent trade for a crypto pair.

## Get Last Trade

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/cex/{exchange}/{market}/lasttrade`

Returns an object containing the latest trade for a crypto pair on an exchange.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "id": "279363545",
    "timestamp": "1644525461042",
    "price": 43990.48,
    "size": 0.00608355,
    "cost": 267.618284604,
    "side": "buy"
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/lasttrade
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/lasttrade?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/lasttrade?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/lasttrade?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/lasttrade?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/lasttrade?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "id": "279363545",
    "timestamp": "1644525461042",
    "price": 43990.48,
    "size": 0.00608355,
    "cost": 267.618284604,
    "side": "buy"
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                   |
| -------------- | --------- | --------------------------------------------- |
| exchange       | string    | The exchange id the trade occurred on.        |
| market         | string    | The crypto pair that was traded.              |
| id             | string    | The exchange specific unique id of the trade. |
| timestamp      | string    | The Unix timestamp that trade was executed.   |
| price          | float     | The quote currency price of the market.       |
| size           | float     | The quantity traded.                          |
| cost           | float     | The quote cost: (size \* price).              |
| side           | string    | Whether the trade was a buy or sell.          |


# Snapshot

Get snapshot returns the current price and aggregates of a crypto pair.

## Get Snapshot

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/cex/{exchange}/{market}/snapshot`

Returns an object with the current price and latest aggregates of a crypto pair.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "currentPrice": {
    "timestamp": "1644514081304",
    "price": 45664.68
    },
    "lastAggregates": [
        {
        "timeframe": "1m",
        "t": 1644514020000,
        "o": 45611.24,
        "h": 45642.66,
        "l": 45603.99,
        "c": 45633.36,
        "v": 3.06919763
        },
        {
        "timeframe": "5m",
        "t": 1644513600000,
        "o": 45609.98,
        "h": 45618.75,
        "l": 45518.29,
        "c": 45556.56,
        "v": 68.72929794
        },
        {
        "timeframe": "15m",
        "t": 1644513300000,
        "o": 45700,
        "h": 45855,
        "l": 45518.29,
        "c": 45674.69,
        "v": 325.19832174
        },
        {
        "timeframe": "1h",
        "t": 1644512400000,
        "o": 45428.67,
        "h": 45855,
        "l": 45350,
        "c": 45553.23,
        "v": 539.73451388
        },
        {
        "timeframe": "6h",
        "t": 1644494400000,
        "o": 44871.79,
        "h": 45855,
        "l": 43210,
        "c": 45635.08,
        "v": 8832.20007482
        },
        {
        "timeframe": "1d",
        "t": 1644451200000,
        "o": 44416.39,
        "h": 45855,
        "l": 43210,
        "c": 45633.36,
        "v": 13322.95932161
        }
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/snapshot
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/snapshot?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/snapshot?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/snapshot?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/snapshot?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/snapshot?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "currentPrice": {
    "timestamp": "1644514081304",
    "price": 45664.68
    },
    "lastAggregates": [
        {
        "timeframe": "1m",
        "t": 1644514020000,
        "o": 45611.24,
        "h": 45642.66,
        "l": 45603.99,
        "c": 45633.36,
        "v": 3.06919763
        },
        {
        "timeframe": "5m",
        "t": 1644513600000,
        "o": 45609.98,
        "h": 45618.75,
        "l": 45518.29,
        "c": 45556.56,
        "v": 68.72929794
        },
        {
        "timeframe": "15m",
        "t": 1644513300000,
        "o": 45700,
        "h": 45855,
        "l": 45518.29,
        "c": 45674.69,
        "v": 325.19832174
        },
        {
        "timeframe": "1h",
        "t": 1644512400000,
        "o": 45428.67,
        "h": 45855,
        "l": 45350,
        "c": 45553.23,
        "v": 539.73451388
        },
        {
        "timeframe": "6h",
        "t": 1644494400000,
        "o": 44871.79,
        "h": 45855,
        "l": 43210,
        "c": 45635.08,
        "v": 8832.20007482
        },
        {
        "timeframe": "1d",
        "t": 1644451200000,
        "o": 44416.39,
        "h": 45855,
        "l": 43210,
        "c": 45633.36,
        "v": 13322.95932161
        }
    ]
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                                        |
| -------------- | --------- | ------------------------------------------------------------------ |
| exchange       | string    | Unique identifier used by Abyiss for the exchange.                 |
| market         | string    | Unique identifier used by the exchange for ticker.                 |
| currentPrice   | object    | Object with the time and price                                     |
| timestamp      | string    | Unix timestamp of the current price.                               |
| price          | float     | The latest price of the crypto asset.                              |
| timeframe      | string    | Aggregate bar or candlestick time frame. (1m, 5m, 15m, 1h, 6h, 1d) |
| lastAggregates | array     | Array of aggregates                                                |
| t              | integer   | Unix timestamp at the start of the aggregate.                      |
| o              | float     | The open or first price of the aggregate.                          |
| h              | float     | The highest price of the aggregate.                                |
| l              | float     | The lowest price of the aggregate.                                 |
| c              | float     | The close or last price of the aggregate.                          |
| v              | float     | The volume or quantity traded within the aggregate.                |


# Order Books

Get order books returns a full order book for a crypto pair from an exchange.

## Get Order Books

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/cex/{exchange}/{market}/orders`

Returns a snapshot of the recent level 2 orderbook for a crypto pair on an exchange.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange":"coinbasepro",
    "market":"BTC/USD",
    "nonce":14601360013,
    "bids":
    [
        [
            61947.91,
            1.48088
        ],
        [
            61947.9,
            0.5
        ],
        [
            61944.07,
            0.44094
        ]
    ],
    "asks":
    [
        [
            61947.92,
            2.28573
        ],
        [
            61952.89,
            0.11214
        ],
        [
            61952.9,
            0.50224
        ]
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/orders?apiKey=*
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey)

orderbook = client.orderBook("coinbasepro", "BTC-USDT")

print(orderBook)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/orders?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/orders?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/orders?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v2/cex/coinbasepro/BTC-USD/orders?apiKey=>

```json
{
    "exchange":"coinbasepro",
    "market":"BTC/USD",
    "nonce":14601360013,
    "bids":
    [
        [
            61947.91,
            1.48088
        ],
        [
            61947.9,
            0.5
        ],
        [
            61944.07,
            0.44094
        ]
    ],
    "asks":
    [
        [
            61947.92,
            2.28573
        ],
        [
            61952.89,
            0.11214
        ],
        [
            61952.9,
            0.50224
        ]
    ]
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                                      |
| -------------- | --------- | ---------------------------------------------------------------- |
| exchange       | string    | The exchange id the order book is from.                          |
| market         | string    | The crypto pair the order book is about.                         |
| nonce          | integer   | The serial unique identifier of the order book on the exchange.  |
| bids           | array     | Arrays of bids in the market \[\[float, float], \[float, float]] |
| asks           | array     | Arrays of asks in the market \[\[float, float], \[float, float]] |


# Liquidity

Get liquidity returns the total liquidity for a crypto pair on an exchange.

## Get Liquidity

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/analytics/liquidity/{exchange}/{market}`

Returns an object containing the total liquidity for a crypto pair on an exchange.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

<pre class="language-javascript"><code class="lang-javascript">{
<strong>    "exchange": "coinbasepro",
</strong>    "market": "BTC-USD",
    "nonce": 5640375978,
    "liquidity": 37224813.18828725
}
</code></pre>

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/analytics/liquidity/coinbasepro/btc-usd
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/analytics/liquidity/coinbasepro/btc-usd?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/analytics/liquidity/coinbasepro/btc-usd?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/analytics/liquidity/coinbasepro/btc-usd?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/analytics/liquidity/coinbasepro/btc-usd?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v2/analytics/liquidity/coinbasepro/btc-usd?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC-USD",
    "nonce": 5640375978,
    "liquidity": 37224813.18828725
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                                     |
| -------------- | --------- | --------------------------------------------------------------- |
| exchange       | string    | The exchange id.                                                |
| market         | string    | The crypto pair.                                                |
| nonce          | integer   | The serial unique identifier of the order book on the exchange. |
| liquidity      | integer   | The total liquidity for a crypto market pair.                   |


# Whales

Get whales returns large crypto trades for a crypto pair from an exchange.

## Get Whales

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/analytics/whales/{exchange}/{market}`

Returns an object containing large crypto trades for a crypto pair on an exchange.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "name": "BTC-USD",
    "exchangeId": "coinbasepro",
    "base": "BTC",
    "quote": "USD",
    "whales": {
        "nodes": [
            {
                "cost": 220116.966516,
                "id": 18332,
                "idOnExchange": "456861288",
                "insertedAt": "2022-11-17T15:49:18.878",
                "price": 16560,
                "side": "buy",
                "size": 13.29208735
            },
        ]
    }
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## Get Whales Today

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/analytics/whales/today`

Returns an object containing the most recent or newest top 50 large crypto trades within the last 24 hours. Resets every day.

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "cost": 313438.248,
    "id": 18336,
    "idOnExchange": "1025921603",
    "insertedAt": "2022-11-18T05:21:40.879",
    "market": {
        "name": "ETH-USDT",
        "exchangeId": "binance",
        "base": "ETH",
        "quote": "USDT"
    },
    "price": 1224,
    "side": "sell",
    "size": 256.077
},
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## Get Whales Recent

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/analytics/whales/recent`

Returns an object containing the most recent large crypto trades.

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "cost": 313438.248,
    "id": 18336,
    "idOnExchange": "1025921603",
    "insertedAt": "2022-11-18T05:21:40.879",
    "market": {
        "name": "ETH-USDT",
        "exchangeId": "binance",
        "base": "ETH",
        "quote": "USDT"
    },
    "price": 1224,
    "side": "sell",
    "size": 256.077
},
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/analytics/whales/coinbasepro/btc-usd
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/analytics/whales/coinbasepro/btc-usd?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/analytics/whales/coinbasepro/btc-usd?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/analytics/whales/coinbasepro/btc-usd?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/analytics/whales/coinbasepro/btc-usd?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

{% tabs %}
{% tab title="Whales" %}
Example URL: <https://api.abyiss.com/v2/analytics/whales/coinbasepro/btc-usd?apiKey=>

```json
{
    "name": "BTC-USD",
    "exchangeId": "coinbasepro",
    "base": "BTC",
    "quote": "USD",
    "whales": {
        "nodes": [
            {
                "cost": 220116.966516,
                "id": 18332,
                "idOnExchange": "456861288",
                "insertedAt": "2022-11-17T15:49:18.878",
                "price": 16560,
                "side": "buy",
                "size": 13.29208735
            },
        ]
    }
}
```

{% endtab %}

{% tab title="Whales Today" %}
Example URL: <https://api.abyiss.com/v2/analytics/whales/today?apiKey=>

```json
{
    "cost": 313438.248,
    "id": 18336,
    "idOnExchange": "1025921603",
    "insertedAt": "2022-11-18T05:21:40.879",
    "market": {
        "name": "ETH-USDT",
        "exchangeId": "binance",
        "base": "ETH",
        "quote": "USDT"
    },
    "price": 1224,
    "side": "sell",
    "size": 256.077
},
```

{% endtab %}

{% tab title="Whales Recent" %}
Example URL: <https://api.abyiss.com/v2/analytics/whales/recent?apiKey=>

```json
{
    "cost": 313438.248,
    "id": 18336,
    "idOnExchange": "1025921603",
    "insertedAt": "2022-11-18T05:21:40.879",
    "market": {
        "name": "ETH-USDT",
        "exchangeId": "binance",
        "base": "ETH",
        "quote": "USDT"
    },
    "price": 1224,
    "side": "sell",
    "size": 256.077
},
```

{% endtab %}
{% endtabs %}

### Response Attributes

| Attribute Name | Data Type | Description                                               |
| -------------- | --------- | --------------------------------------------------------- |
| name           | string    | Unique identifier used by the exchange for ticker.        |
| exchangeId     | string    | The exchange id.                                          |
| base           | string    | The base of the market. eg: The quantity that is bought.  |
| quote          | string    | The quote of the market. eg: The currency being compared. |
| cost           | integer   | The quote cost: (size \* price).                          |
| id             | integer   | The exchange specific unique id of the trade.             |
| idOnExchange   | string    | Unique identifier used by the exchange for trade.         |
| insertedAt     | string    | Unix timestamp of the trade.                              |
| price          | integer   | The price the trade was executed at.                      |
| side           | string    | Whether the trade was a buy or sell.                      |
| size           | integer   | The quantity traded.                                      |


# WebSockets

Centralized exchange real-time Websockets connections.

{% hint style="warning" %}
**Request access by emailing** [**support@abyiss.com**](mailto:support@abyiss.com)**.**
{% endhint %}

Real-time WebSocket data and connections to 30+ cryptocurrency exchanges.&#x20;

Currently in early alpha. Initial usage will be rolled out one exchange at a time. Contact our support team or email us at [support@abyiss.com](<mailto:support@abyiss.com >) to request access.


# Request Access

Request access by emailing support\@abyiss.com.

{% hint style="warning" %}
**Request access by emailing** [**support@abyiss.com**](mailto:support@abyiss.com)**.**
{% endhint %}

Real-time WebSocket data and connections to 30+ cryptocurrency exchanges.&#x20;

Currently in early alpha. Initial usage will be rolled out one exchange at a time. Contact our support team or email us at [support@abyiss.com](<mailto:support@abyiss.com >) to request access.


# Introduction

Decentralized crypto exchanges REST APIs and WebSockets documentation.

{% hint style="warning" %}
**To request access, please email** [**support@abyiss.com**](mailto:support@abyiss.com)**.**
{% endhint %}

Decentralized exchange APIs and data from UniSwap, SushiSwap, and Curve Finance. Currently in early beta.

**Contact our support team or email us at** [**support@abyiss.com**](<mailto:support@abyiss.com >) **to request access.**

## Get Started

Welcome to the Abyiss decentralized Exchange API Documentation! This section of our documentation covers everything related to centralized exchanges, including supported exchanges, REST APIs, Websockets, historical data, query parameters, error handling, return types, and more.

To get started, you'll need to create an account and API key with Abyiss. This will allow you to access our endpoints and start building your applications with our decentralized exchange data. You can create an account by [clicking the link here](https://abyiss.com/signin), and learn more about [API Keys and Authorization](/introduction/api-architecture/api-keys-authentication) by clicking the link provided here.

Some of the important endpoints available through our API include:

* [REST APIs](/blockchain-api/rest-apis): Access real-time and historical market data and reference data from our supported exchanges
* [Websockets](/blockchain-api/websockets): Subscribe to real-time updates on market data and other information
* [Historical Data](/blockchain-api/references/historical-data): Retrieve historical market data for analysis and backtesting
* [Query Parameters](/blockchain-api/references/query-parameters): Modify the behavior of an API request and can be used to filter, sort, or paginate the response data
* [Error Handling](/blockchain-api/references/error-handling): Information on how to handle errors that may occur when making requests to our API.

We hope this documentation will serve as a helpful resource as you work with our centralized exchange API. If you have any questions or need assistance, please don't hesitate to contact our [support team](https://abyiss.com/contact).


# References

Decentralized exchange API reference documentation.

{% hint style="info" %}
**Abyiss Decentralized Exchange API Reference Documentation**&#x20;
{% endhint %}

Welcome to the Abyiss Decentralized Exchange API Reference Documentation. Here, you can learn about the unique characteristics and core concepts behind our centralized exchanges API.

Please note that you will need an account and API Key to access these endpoints. If you don't have an account yet, you can create one by [clicking here](https://abyiss.com/signin). To learn more about API Keys and Authorization, please [click here](/introduction/api-architecture/api-keys-authentication).

The following topics are covered in this documentation:

* [Supported Exchanges](/blockchain-api/references/supported-exchanges)
* [Historical Data](/blockchain-api/references/historical-data)
* [Query Parameters](/blockchain-api/references/query-parameters)
* [Error Handling](/blockchain-api/references/error-handling)

If you have any questions or need further assistance, please don't hesitate to contact our support team at <support@abyiss.com>.


# Supported Exchanges

Supported decentralized crypto exchanges.

We currently support over a few decentralized cryptocurrency exchanges and trading APIs, and we're constantly adding more to the list. For an up-to-date and accurate list of the exchanges we support, please refer to the [exchange documentation linked here](/blockchain-api/rest-apis/exchanges).

If you have any questions or concerns about using any of these exchanges with our platform, please don't hesitate to contact our support team at <support@abyiss.com>.&#x20;

| Name       | ID      | Blockchains                                                      |
| ---------- | ------- | ---------------------------------------------------------------- |
| Uniswap V3 | uniswap | Ethereum, Polygon, Optimism, Celo, Arbitrum, Binance Smart Chain |


# Historical Data

How to get decentralized exchanges historical data and information.

{% hint style="info" %}
**Historical price trends can indicate the future direction of a cryptocurrency**
{% endhint %}

Our decentralized exchange (DEX) APIs allow you to retrieve historical data from the point of inception of on the blockchain.

This section of our documentation will cover how our DEX historical data works, provide an example API request, and show the response objects. If you want to save large amounts of historical data, please [contact us here](https://abyiss.com/contact).

<figure><img src="/files/KeBHsaNO3WZckvobGbiI" alt=""><figcaption><p>How Blockchains Work</p></figcaption></figure>

## How It Works

To retrieve historical data from our DEX APIs, you can include a **`block`** number in your REST API request.&#x20;

The response will then return data from that block number and time. This allows you to get a snapshot of the market at a specific point in time.

{% hint style="warning" %}
**NOTE: Each blockchain has different block numbers**
{% endhint %}

| Parameter   | Data Type | Description                                                   |
| ----------- | --------- | ------------------------------------------------------------- |
| **`block`** | BigInt    | Blockchain block number from which you wish to retrieve data. |

## Historical Data

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex/{exchange}/{blockchain}/token/{token}?block={block}`

Returns an object with historical token data from the decentralized exchange.

#### Path Parameters

| Name                                         | Type   | Description                           |
| -------------------------------------------- | ------ | ------------------------------------- |
| exchange<mark style="color:red;">\*</mark>   | string | Decentralized exchange Id             |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain for Decentralized exchange |
| token                                        | string | Token contract address                |

#### Query Parameters

| Name                                     | Type   | Description                                                   |
| ---------------------------------------- | ------ | ------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key                                           |
| block<mark style="color:red;">\*</mark>  | bigInt | Blockchain block number from which you wish to retrieve data. |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "name": "Wrapped Ether",
    "symbol": "WETH",
    "tokenDecimals": "18",
    "totalSupply": "19848",
    "tokenTotalValueLocked": "496263.702184064205187781",
    "tokenTotalValueLockedUSD": "1283992246.955587601543407324458405",
    "tokenVolume": "121792908.279612731691113232",
    "tokenVolumeUSD": "385281251499.8191539565651064429059",
    "tokenUntrackedVolumeUSD": "417601628067668.5117154048596359694",
    "tokenTxCount": "10537135",
    "tokenDerivedETH": "1",
    "tokenFeesUSD": "747842505.4534584099838376521080428"
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## Example API Requests

### Historical Token Data

To retrieve historical token data from Uniswap on the Ethereum blockchain for the block number **`14369620`**, you can use the following REST API request:

**Example URL:** <https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2?block=14369620&apiKey=>

```json
{
    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "name": "Wrapped Ether",
    "symbol": "WETH",
    "tokenDecimals": "18",
    "totalSupply": "19848",
    "tokenTotalValueLocked": "496263.702184064205187781",
    "tokenTotalValueLockedUSD": "1283992246.955587601543407324458405",
    "tokenVolume": "121792908.279612731691113232",
    "tokenVolumeUSD": "385281251499.8191539565651064429059",
    "tokenUntrackedVolumeUSD": "417601628067668.5117154048596359694",
    "tokenTxCount": "10537135",
    "tokenDerivedETH": "1",
    "tokenFeesUSD": "747842505.4534584099838376521080428"
}
```

### Historical Liquidity Pool Data

To retrieve historical liquidity pool data from Uniswap on the Polygon blockchain for the block number **`23757546`**, you can use the following REST API request:

**Example URL:** <https://api.abyiss.com/v2/dex/uniswap/polygon/liquidityPool/0x45dda9cb7c25131df268515131f647d726f50608?block=23757546&apiKey=>

```json
{
    "id": "0x45dda9cb7c25131df268515131f647d726f50608",
    "createdAtBlockNumber": "22765962",
    "createdAtTimestamp": "1640039738",
    "feeGrowthGlobal0X128": "60536654720404509971611872510153",
    "feeGrowthGlobal1X128": "17843914817980276280001540527907746629703",
    "feeTier": "500",
    "feesUSD": "268609.5795198478368660011539635115",
    "liquidity": "1360100430820545186",
    "liquidityProviderCount": "0",
    "observationIndex": "0",
    "sqrtPrice": "1369994126740344068227602891313558",
    "tick": "195169",
    "token0Price": "3344.427277021344663566865574862442",
    "token1Price": "0.0002990048570859140980270872373141435",
    "totalValueLockedToken0": "3619240.485924",
    "totalValueLockedETH": "2532.243503353830643465093065612289",
    "totalValueLockedToken1": "1452.565056160951251",
    "totalValueLockedUSD": "8488451.567579511717748777037757474",
    "totalValueLockedUSDUntracked": "0",
    "txCount": "192809",
    "volumeUSD": "537219159.0396956737320023079270381",
    "volumeToken1": "153656.47783655488677983",
    "volumeToken0": "537213228.54428",
    "untrackedVolumeUSD": "537219159.0396956737320023079270381",
    "token0": {
        "id": "0x2791bca1f2de4661ed88a30c99a7a9449aa84174",
        "name": "USD Coin (PoS)",
        "symbol": "USDC",
        "tokenDecimals": "6",
        "totalSupply": "16856",
        "tokenTotalValueLocked": "11437616.202225",
        "tokenTotalValueLockedUSD": "11437616.202225",
        "tokenVolume": "783379794.265346",
        "tokenVolumeUSD": "783392806.2960774506181873165042592",
        "tokenUntrackedVolumeUSD": "783157256.7401425175445112722903314",
        "tokenTxCount": "566461",
        "tokenDerivedETH": "0.0002983163045926292259138186726124447",
        "tokenFeesUSD": "584426.959863467975264105353166601"
        },
    "token1": {
        "id": "0x7ceb23fd6bc0add59e62ac25578270cff1b9f619",
        "name": "Wrapped Ether",
        "symbol": "WETH",
        "tokenDecimals": "18",
        "totalSupply": "17392",
        "tokenTotalValueLocked": "5908.192781601604246418",
        "tokenTotalValueLockedUSD": "19805128.61899933636820871402007395",
        "tokenVolume": "273735.608749455327351096",
        "tokenVolumeUSD": "960317963.5060527982632484865360554",
        "tokenUntrackedVolumeUSD": "960264229.7950206419447721856414932",
        "tokenTxCount": "517866",
        "tokenDerivedETH": "1",
        "tokenFeesUSD": "894601.2212662749769940363441506731"
    }
}
```


# Pagination

How to increase API data limit for decentralized exchanges using pagination.

{% hint style="info" %}
**Get `/tokens?limit=500`**
{% endhint %}

Abyiss implements cursor pagination for all REST requests that return arrays of data. This includes endpoints such as `/tokens` and `/pools`. By default, these endpoints return the latest items. To retrieve more results per page, you can specify the `limit` parameter.

The `limit` parameter determines the number of results to be included in each page of the response. It's important to note that the maximum pagination limit may vary depending on the specific exchange. Some exchanges may support higher pagination limits than others.

## Example

To fetch a page of tokens with a limit of 500 results, you can use the following API request:

```bash
GET /tokens?limit=500
```

**Example URL:**

{% embed url="<https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?limit=1000&apiKey=YOUR_API_KEY>" %}
Example API Request
{% endembed %}

## Parameters

<table><thead><tr><th width="150">Parameter</th><th width="211.4">Default</th><th>Description</th></tr></thead><tbody><tr><td>limit</td><td>100</td><td>Number of results per request. Maximum 1,000. (default 100)</td></tr></tbody></table>


# Query Parameters

Decentralized exchange API query parameters.

## Introduction

The Abyiss DEX API supports a range of query parameters to help you customize your data requests. These parameters allow you to filter, sort, and paginate the data returned by the API, making it easier to extract the information you need more efficiently.

Here are the four main query parameters available in the Abyiss DEX APIs. For the following API endpoints:

* [**Tokens**](/blockchain-api/rest-apis/tokens)
* [**Token Aggregates (Bars)**](/blockchain-api/rest-apis/token-aggregates-bars)
* [**Liquidity Pool Aggregates (Bars)**](/blockchain-api/rest-apis/pool-aggregates-bars)

By using the query parameters available in the Abyiss DEX API, you can fine-tune your data requests and get the most relevant and up-to-date information from your preferred decentralized exchanges.

## Query Parameters

### Limit

This parameter specifies the number of results to return per request. The maximum value is 1,000, and the default value is 100.

**Example URL**: <https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?limit=500&apiKey=>

| Query Parameter | Data Type | Description                                                  |
| --------------- | --------- | ------------------------------------------------------------ |
| `limit`         | int       | Number of results per request. Maximum 1,0000 (default 100). |

### Order By

This `orderBy` parameter allows you to specify the field to sort the returned data by. You can enter the name of any field in the API response, such as `id`, `name`, `symbol`, `volumeUSD` and more.&#x20;

The API will return the results sorted by that field in either ascending or descending order. For example, if you specify `orderBy=id`, the API will sort the results by ID in ascending order.

**Example URL**: <https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?orderBy=volumeUSD&apiKey=>

| Query Parameter | Type   | Description                                                                                                    |
| --------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| `orderBy`       | string | Sort the returned data by any field in the API response, such as `id`, `name`, `symbol`, `volumeUSD` and more. |

### Order Direction

This `orderDirection` parameter specifies the direction to sort the results in. You can choose between `asc` (ascending) and `desc` (descending) order.

**Example URL**: <https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?orderDirection=asc&apiKey=>

| Query Parameter  | Type   | Description                                                                                      |
| ---------------- | ------ | ------------------------------------------------------------------------------------------------ |
| `orderDirection` | string | `asc` or `desc` return the results sorted by that field in either ascending or descending order. |

### Skip

This `skip` parameter specifies the number of results to skip per request. For example, if you set skip=100, the API will skip the first 100 results and return the next 100 results.

**Example URL**: <https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?skip=1000&apiKey=>

<table><thead><tr><th width="212.33333333333331">Query Parameter</th><th>Type</th><th>Description</th></tr></thead><tbody><tr><td><code>skip</code></td><td>int</td><td>Number of results to skip per request.</td></tr></tbody></table>

### Block

The `block` parameter specifies the blockchain block number for historical data. For example, if you set block=123456, the API will return data for the specified block number.

**Example URL**: <https://api.abyiss.com/v2/dex/uniswap/ethereum?block=16309685&apiKey=>

| Query Parameter | Type | Description                                      |
| --------------- | ---- | ------------------------------------------------ |
| `block`         | int  | The blockchain block number for historical data. |

### From

The `from` parameter specifies the start of the aggregate time window for historical data, and it must be provided as a Unix timestamp in milliseconds.&#x20;

For example, if you set from=1617644400000, the API will return data starting from April 5th, 2021 at 12:00:00 AM UTC.

**Example URL**: <https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/aggregate?timeframe=day&from=1617644400000&apiKey=>

| Query Parameter | Type | Description                                                                                 |
| --------------- | ---- | ------------------------------------------------------------------------------------------- |
| `from`          | int  | The start of the aggregate time window for historical data. Unix timestamp in milliseconds. |

### To

The `to` parameter specifies the end of the aggregate time window for historical data, and it must be provided as a Unix timestamp in milliseconds.&#x20;

For example, if you set to=1617730799000, the API will return data up until April 6th, 2021 at 11:59:59 PM UTC.

**Example URL**: <https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/aggregate?timeframe=day&to=1617730799000&apiKey=>

| Query Parameter | Type | Description                                                                               |
| --------------- | ---- | ----------------------------------------------------------------------------------------- |
| `to`            | int  | The end of the aggregate time window for historical data. Unix timestamp in milliseconds. |

### Mint

The `mint` parameter is a boolean data type that is only applicable to the trades endpoints. By default, it is set to 'true', which means that the API will return the mints array on the trades endpoints. However, if you set 'mint' to 'false', the mints array will not be returned.

**Example URL**: <https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/trades?mint=false&apiKey=>

| Query Parameter | Type    | Description                            |
| --------------- | ------- | -------------------------------------- |
| `mint`          | boolean | Set to false to not return mint array. |

### Burn

The `burn` parameter is a boolean data type that is only applicable to the trades endpoints. By default, it is set to 'true', which means that the API will return the burns array on the trades endpoints. However, if you set 'burn' to 'false', the burns array will not be returned.

**Example URL**: <https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/trades?burn=false&apiKey=>

| Query Parameter | Type    | Description                            |
| --------------- | ------- | -------------------------------------- |
| `burn`          | boolean | Set to false to not return burn array. |

### Swap

The `swap` parameter is a boolean data type that is only applicable to the trades endpoints. By default, it is set to 'true', which means that the API will return the swaps array on the trades endpoints. However, if you set 'swap' to 'false', the swaps array will not be returned.

**Example URL**: <https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/trades?swap=false&apiKey=>

| Query Parameter | Type    | Description                            |
| --------------- | ------- | -------------------------------------- |
| `swap`          | boolean | Set to false to not return swap array. |

### Logo

The token `logo` parameter is a boolean data type that is only applicable to the tokens endpoint. By default, it is set to 'false', which means that the API will not return the token logos. However, if you set '`logo`' to 'true', the tokens logos will be returned.

**Example URL**:&#x20;

<https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?tokenSymbol=WETH&logo=true&apiKey=YOUR_API_KEY>


# Error Handling

Decentralized exchange error handling and codes.

All requests and responses are `application/json` content type and follow typical HTTP response status codes for success and failure.&#x20;

## Success

A successful response is indicated by HTTP status code 200 and may contain an optional body. If the response has a body it will be documented.

## Errors

{% hint style="info" %}
**To access additional information about our error codes, please refer to the documentation on** [**Common Error Codes**](/introduction/api-architecture/requests-and-error-codes)**.**
{% endhint %}

```json
{
   "message": "Exchange Not Found"
}
```

Unless otherwise stated, errors to bad requests will respond with HTTP 4xx or status codes. The body will also contain a `message` parameter indicating the cause. Your language's http library should be configured to provide message bodies for non-2xx requests so that you can read the message field from the body.

### Block Number

This error occurs when there is a failure to decode the `block.number` value. It is caused by the unavailability of data for a specific block number. This can happen when a token or liquidity pool did not exist at a certain block number and time.

To resolve this issue, you need to ensure that the requested token or liquidity pool exists at the specified block number. You may need to adjust the block number or time to a more recent point in the blockchain's history where the token or liquidity pool was already created.

If you encounter the following error message:

```json
{
    "message": "Failed to decode `block.number` value: `only has data starting at block number 12369620 and data for block number 1 is therefore not available`"
}
```

You can try specifying a higher block number, such as `12369621` or a later block number, depending on when the token or liquidity pool was created.

{% hint style="warning" %}
**Each blockchain has its own unique block number system, so be sure to consult the appropriate documentation for the blockchain you are using.**
{% endhint %}

### Contract Address

This error occurs when there is an error fetching the liquidity pool or token for a specified contract address id. It can happen when the contract address id does not exist on the blockchain.

To resolve this issue, you need to verify that the contract address id exists on the specified blockchain. Check that you have entered the correct contract address id and that the contract has been deployed on the blockchain.

If you encounter the following error message:

<pre class="language-json"><code class="lang-json">{
<strong>    "message": "Error fetching liquidity pool for address: "XXX"
</strong>}
</code></pre>

Double-check that the specified contract address id exists on the blockchain. You may need to consult the relevant documentation to ensure that the contract has been deployed and is active on the blockchain.

{% hint style="warning" %}
**Each blockchain has its own unique system for managing contract addresses. Be sure to consult the appropriate documentation for the blockchain you are using to verify the contract address.**
{% endhint %}


# REST APIs

Decentralized exchange REST APIs documentation.

Welcome to Abyiss Decentralized Exchange REST API documentation! This page contains information about the reference data and market data endpoints available for our decentralized exchange APIs.

## Authentication

To use our REST API, you'll need an account and an API Key. If you don't have one yet, create an [account with Abyiss](https://abyiss.com/signin) and learn more about [API Keys and Authorization](/introduction/api-architecture/api-keys-authentication) in our Authentication section.

## Endpoints & Data

Our REST API also provides access to market data and reference data endpoints that contain real-time and historical data about supported exchanges and their symbols.

The following endpoints are available:

* [Exchanges](/blockchain-api/rest-apis/exchanges)
* [Blockchains](/blockchain-api/rest-apis/blockchains)
* [Exchange Data](/blockchain-api/rest-apis/exchange-data)
* [Tokens](/blockchain-api/rest-apis/tokens)
* [Token Data](/blockchain-api/rest-apis/token-data)
* [Token Aggregates (Bars)](/blockchain-api/rest-apis/token-aggregates-bars)
* [Liquidity Pool](/blockchain-api/rest-apis/pools)
* [Liquidity Pool Aggregates (Bars)](/blockchain-api/rest-apis/pool-aggregates-bars)

## Pro Tips for Reading Documentation

To better understand our documentation, here are some pro tips to keep in mind:

* **Be patient**: Take your time to go through the documentation to avoid missing important details.
* **Review terms**: Make sure to familiarize yourself with key terms and definitions used in the documentation.
* **Read slowly**: Read each section of the documentation slowly and carefully to ensure that you understand everything.
* **Reread things**: If you're having trouble understanding a particular section, reread it or consult external resources.
* **Click the drop-down arrows**: Expand the sections and sub-sections to see more detailed information.
* **Read the overviews**: Start with the overviews to get a general idea of the information available in the documentation.
* **Google anything you don't understand**: If you encounter unfamiliar terms or concepts, Google them to learn more.
* **Contact us if you're having trouble**: If you're still having trouble understanding our documentation, don't hesitate to contact our support team for assistance.

That's it! We hope this page helps you understand our REST API better. If you have any questions or concerns, please don't hesitate to contact our [support team](https://abyiss.com/contact).


# Exchanges

Get exchanges returns all decentralized exchanges supported by Abyiss.

## Get Exchanges

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex`

Returns an array of all supported decentralized exchanges.

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
    {
        "name": "Uniswap",
        "id": "uniswap"
    }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/dex?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/dex?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/dex?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/dex?apiKey=>

```json
[
    {
        "name": "Uniswap",
        "id": "uniswap"
    }
]
```

### Response Attributes

| Attribute Name | Data Type | Description                                |
| -------------- | --------- | ------------------------------------------ |
| name           | string    | The official name of the exchange.         |
| id             | string    | Unique exchange identifier used by Abyiss. |


# Blockchains

Get blockchains returns the supported blockchains for a decentralized exchange.

## Get Exchange Blockchains

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex/{exchange}`

Returns an array of supported blockchains for a decentralized exchange.

#### Path Parameters

| Name                                       | Type   | Description                |
| ------------------------------------------ | ------ | -------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | The decentralized exchange |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
    {
        "id": "ethereum",
        "name": "Ethereum"
    },
    {
        "id": "polygon",
        "name": "Polygon"
    },
    {
        "id": "optimism",
        "name": "Optimism"
    },
    {
        "id": "celo",
        "name": "Celo"
    },
    {
        "id": "arbitrum",
        "name": "Arbitrum"
    },
    {
        "id": "binance",
        "name": "Binance Smart Chain"
    }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/dex/uniswap?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/dex/uniswap?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/dex/uniswap?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex/uniswap?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/dex/uniswap?apiKey=>

```json
[
    {
        "id": "ethereum",
        "name": "Ethereum"
    },
    {
        "id": "polygon",
        "name": "Polygon"
    },
    {
        "id": "optimism",
        "name": "Optimism"
    },
    {
        "id": "celo",
        "name": "Celo"
    },
    {
        "id": "arbitrum",
        "name": "Arbitrum"
    },
    {
        "id": "binance",
        "name": "Binance Smart Chain"
    }
]
```

### Response Attributes

| Attribute Name | Data Type | Description                                      |
| -------------- | --------- | ------------------------------------------------ |
| id             | string    | Unique exchange identifier used by Abyiss.       |
| name           | string    | The official name of the decentralized exchange. |


# Blocks

Get blocks returns real-time or historical blockchain block numbers and timestamps.

## Get Blocks

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/blocks`

Provides a list of compatible blockchains for retrieving block numbers and timestamps in an array.

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```json
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## Get Blockchain Blocks

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/blocks/{blockchain}`

Returns an array of real-time or historical blockchain block numbers and timestamps.&#x20;

#### Path Parameters

| Name                                         | Type   | Description                       |
| -------------------------------------------- | ------ | --------------------------------- |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain for the block numbers. |

#### Query Parameters

| Name                                     | Type   | Description                                                                                                    |
| ---------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key                                                                                            |
| limit                                    | int    | Number of results per request. Maximum 1,0000 (defualt 100)                                                    |
| skip                                     | int    | Number of results to skip per request.                                                                         |
| orderBy                                  | string | Sort the returned data by any field in the API response, such as `id`, `name`, `symbol`, `volumeUSD` and more. |
| orderDirection                           | string | `asc` or `desc` return the results sorted by that field in either ascending or descending order.               |
| block                                    | int    | The blockchain block number for historical data.                                                               |
| from                                     | int    | The start of the aggregate time window for historical data. Unix timestamp in milliseconds.                    |
| to                                       | int    | The end of the aggregate time window for historical data. Unix timestamp in milliseconds.                      |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
    {
        "number": "17017595",
        "timestamp": "1681127183",
        "size": "379123",
        "gasLimit": "30000000",
        "gasUsed": "21721808",
        "totalDifficulty": "58750003716598352816469",
        "author": "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97"
    }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/blocks/ethereum
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/blocks/ethereum?apiKey="
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/blocks/ethereum?apiKey=")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/blocks/ethereum?apiKey=")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/blocks/ethereum?apiKey=")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/blocks/ethereum?apiKey=>

```json
[
    {
        "number": "17017595",
        "timestamp": "1681127183",
        "size": "379123",
        "gasLimit": "30000000",
        "gasUsed": "21721808",
        "totalDifficulty": "58750003716598352816469",
        "author": "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97"
    }
]
```

### Response Attributes

| Attribute Name  | Data Type | Description             |
| --------------- | --------- | ----------------------- |
| number          | string    | Blockchain block number |
| timestamp       | string    | Block number timestamp  |
| size            | string    | Block size              |
| gasLimit        | string    | Block gas limit         |
| gasUsed         | string    | Block gas used          |
| totalDifficulty | string    | Block total difficulty  |
| author          | string    | Block author            |


# Exchange Data

Get exchange data returns real-time or historical decentralized exchange information.

## Get Exchange Data

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex/{exchange}/{blockchain}`

Returns an array of real-time or historical decentralized exchange data.

#### Path Parameters

| Name                                         | Type   | Description                           |
| -------------------------------------------- | ------ | ------------------------------------- |
| exchange<mark style="color:red;">\*</mark>   | string | Decentralized exchange Id             |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain for decentralized exchange |

#### Query Parameters

| Name                                     | Type   | Description                                      |
| ---------------------------------------- | ------ | ------------------------------------------------ |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key                              |
| block                                    | int    | The blockchain block number for historical data. |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
    {
        "id": "0x1F98431c8aD98523631AE4a59f267346ea31F984",
        "poolCount": "10950",
        "txCount": "29888206",
        "totalVolumeUSD": "916847401937.370607825600628166657",
        "untrackedVolumeUSD": "418167060018759.7426039553582786604",
        "totalVolumeETH": "423116538.4473012264357507657269329",
        "totalValueLockedUSD": "1523577228461.761271658156460855197",
        "totalValueLockedETH": "843327060.2839120939378000489695211",
        "totalFeesUSD": "1369740249.46500696391926330064492",
        "totalFeesETH": "575159.1527922034001220649655581179",
        "owner": "0x0000000000000000000000000000000000000000"
    }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap/ethereum
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/dex/uniswap/ethereum?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/dex/uniswap/ethereum?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/dex/uniswap/ethereum?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex/uniswap/ethereum?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/dex/uniswap/ethereum?apiKey=>

```json
[
    {
        "id": "0x1F98431c8aD98523631AE4a59f267346ea31F984",
        "poolCount": "10950",
        "txCount": "29888206",
        "totalVolumeUSD": "916847401937.370607825600628166657",
        "untrackedVolumeUSD": "418167060018759.7426039553582786604",
        "totalVolumeETH": "423116538.4473012264357507657269329",
        "totalValueLockedUSD": "1523577228461.761271658156460855197",
        "totalValueLockedETH": "843327060.2839120939378000489695211",
        "totalFeesUSD": "1369740249.46500696391926330064492",
        "totalFeesETH": "575159.1527922034001220649655581179",
        "owner": "0x0000000000000000000000000000000000000000"
    }
]
```

### Response Attributes

| Attribute Name      | Data Type | Description                                      |
| ------------------- | --------- | ------------------------------------------------ |
| id                  | string    | Exchange contact address                         |
| poolCount           | string    | Amount of pools created                          |
| txCount             | string    | Amount of transactions all-time                  |
| totalVolumeUSD      | string    | Total volume all-time in derived USD             |
| untrackedVolumeUSD  | string    | All volume even through less reliable USD values |
| totalVolumeETH      | string    | Total volume all-time in derived ETH             |
| totalValueLockedUSD | string    | TVL derived in USD                               |
| totalValueLockedETH | string    | TVL derived in ETH                               |
| totalFeesUSD        | string    | Total swap fees all-time in USD                  |
| totalFeesETH        | string    | Total swap fees all-time in ETH                  |
| owner               | string    | Current owner of the cotnract address.           |


# Tokens

Get tokens returns real-time or historical token information.

## Get Tokens

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex/{exchange}/{blockchain}/tokens`

Returns an array of real-time or historical token data on a decentralized exchange.&#x20;

#### Path Parameters

| Name                                         | Type   | Description                           |
| -------------------------------------------- | ------ | ------------------------------------- |
| exchange<mark style="color:red;">\*</mark>   | string | Decentralized exchange Id             |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain for decentralized exchange |

#### Query Parameters

| Name                                     | Type    | Description                                                                                                                 |
| ---------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark> | string  | Your Abyiss API Key                                                                                                         |
| limit                                    | int     | Number of results per request. Maximum 1,0000 (defualt 100)                                                                 |
| orderBy                                  | string  | Sort the returned data by any field in the API response, such as `id`, `name`, `symbol`, `volumeUSD` and more.              |
| orderDirection                           | string  | `asc` or `desc` return the results sorted by that field in either ascending or descending order.                            |
| skip                                     | int     | Number of results to skip per request.                                                                                      |
| tokenSymbol                              | string  | Filters the results to show only records with the specified token symbol. Example: `WETH`                                   |
| tokenId                                  | string  | Filters the results to show only records with the specified token ID. Example: `0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2` |
| tokeName                                 | string  | Filters the results to show only records with the specified token name. Example: `Wrapped Ethereum`                         |
| logo                                     | boolean | Determines whether or not to include the logo in the response. Example: `true` or `false`                                   |

{% tabs %}
{% tab title="200: OK Success" %}

```json
[
    {
        "id": "0x00000000000045166c45af0fc6e4cf31d9e14b9a",
        "name": "TopBidder",
        "symbol": "BID",
        "decimals": "18",
        "supply": "28240",
        "totalValueLocked": "45.690660599764812617",
        "totalValueLockedUSD": "0",
        "volume": "8347.641875381858852443",
        "volumeUSD": "8114.480070327402387046118602321907",
        "untrackedVolumeUSD": "4057.240035163701193523059301160956",
        "txCount": "15",
        "derivedETH": "0",
        "feesUSD": "81.14480070327402387046118602321907",
        "totalValueLockedUSDUntracked": "0",
        "poolCount": "0"
    }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?apiKey=>

```json
[
    {
        "id": "0x00000000000045166c45af0fc6e4cf31d9e14b9a",
        "name": "TopBidder",
        "symbol": "BID",
        "decimals": "18",
        "supply": "28240",
        "totalValueLocked": "45.690660599764812617",
        "totalValueLockedUSD": "0",
        "volume": "8347.641875381858852443",
        "volumeUSD": "8114.480070327402387046118602321907",
        "untrackedVolumeUSD": "4057.240035163701193523059301160956",
        "txCount": "15",
        "derivedETH": "0",
        "feesUSD": "81.14480070327402387046118602321907",
        "totalValueLockedUSDUntracked": "0",
        "poolCount": "0"
    }
]
```

### Response Attributes

<table><thead><tr><th width="265.3333333333333">Attribute Name</th><th>Data Type</th><th>Description </th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Token contact address</td></tr><tr><td>name</td><td>string</td><td>Token name</td></tr><tr><td>symbol</td><td>string</td><td>Token symbol</td></tr><tr><td>tokenDecimals</td><td>string</td><td>Token decimals</td></tr><tr><td>totalSupply</td><td>string</td><td>Token total supply</td></tr><tr><td>tokenTotalValueLocked</td><td>string</td><td>Liquidity across all pools in token units</td></tr><tr><td>tokenTotalValueLockedUSD</td><td>string</td><td>Liquidity across all pools in derived USD</td></tr><tr><td>tokenVolume</td><td>string</td><td>Volume in token units</td></tr><tr><td>tokenVolumeUSD</td><td>string</td><td>Volume in derived USD</td></tr><tr><td>tokenUntrackedVolumeUSD</td><td>string</td><td>Volume in USD even on pools with less reliable USD values</td></tr><tr><td>tokenTxCount</td><td>string</td><td>Transactions across all pools that include this token</td></tr><tr><td>tokenDerivedETH</td><td>string</td><td>Derived price in ETH</td></tr><tr><td>tokenFeesUSD</td><td>string</td><td>Fees in USD</td></tr><tr><td>totalValueLockedUSDUntracked</td><td>string</td><td>TVL derived in USD untracked</td></tr><tr><td>poolCount</td><td>string</td><td>Number of pools containing this token</td></tr></tbody></table>


# Token Data

Get token data returns real-time or historical token information.

## Get Token Data

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex/{exchange}/{blockchain}/token/{token}`

Returns an object of real-time or historical token data on the decentralized exchange.

#### Path Parameters

| Name                                         | Type   | Description                           |
| -------------------------------------------- | ------ | ------------------------------------- |
| exchange<mark style="color:red;">\*</mark>   | string | Decentralized exchange Id             |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain for Decentralized exchange |
| token<mark style="color:red;">\*</mark>      | string | Token contract address.               |

#### Query Parameters

| Name                                     | Type   | Description                                      |
| ---------------------------------------- | ------ | ------------------------------------------------ |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key                              |
| block                                    | int    | The blockchain block number for historical data. |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "name": "Wrapped Ether",
    "symbol": "WETH",
    "decimals": "18",
    "supply": "19848",
    "totalValueLocked": "631142.087037589087808909",
    "totalValueLockedUSD": "1175058789.34375407186171784308728",
    "volume": "344086745.20009839797422871",
    "volumeUSD": "753749160247.6554862800162826515373",
    "untrackedVolumeUSD": "418002367585531.1947936090378553175",
    "txCount": "24827115",
    "derivedETH": "1",
    "feesUSD": "1205919785.200171873113778800523199",
    "totalValueLockedUSDUntracked": "0",
    "poolCount": "0"
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2?apiKey=*")"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2?apiKey=>

```json
{
    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "name": "Wrapped Ether",
    "symbol": "WETH",
    "decimals": "18",
    "supply": "19848",
    "totalValueLocked": "631142.087037589087808909",
    "totalValueLockedUSD": "1175058789.34375407186171784308728",
    "volume": "344086745.20009839797422871",
    "volumeUSD": "753749160247.6554862800162826515373",
    "untrackedVolumeUSD": "418002367585531.1947936090378553175",
    "txCount": "24827115",
    "derivedETH": "1",
    "feesUSD": "1205919785.200171873113778800523199",
    "totalValueLockedUSDUntracked": "0",
    "poolCount": "0"
}
```

### Response Attributes

<table><thead><tr><th width="268.3333333333333">Attribute Name</th><th>Data Type</th><th>Description </th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Token contract address</td></tr><tr><td>name</td><td>string</td><td>Token name</td></tr><tr><td>symbol</td><td>string</td><td>Token symbol</td></tr><tr><td>tokenDecmials</td><td>string</td><td>Token decimals</td></tr><tr><td>totalSupply</td><td>string</td><td>Token total supply</td></tr><tr><td>tokenTotalValueLocked</td><td>string</td><td>Liquidity across all pools in token units</td></tr><tr><td>tokenTotalValueLockedUSD</td><td>string</td><td>Liquidity across all pools in derived USD</td></tr><tr><td>tokenVolume</td><td>string</td><td>Volume in token units</td></tr><tr><td>tokenVolumeUSD</td><td>string</td><td>Volume in derived USD</td></tr><tr><td>tokenUntrackedVolumeUSD</td><td>string</td><td>Volume in USD even on pools with less reliable USD values</td></tr><tr><td>tokenTxCount</td><td>string</td><td>Transactions across all pools that include this token</td></tr><tr><td>tokenDerivedETH</td><td>string</td><td>Derived price in ETH</td></tr><tr><td>tokenFeesUSD</td><td>string</td><td>Fees in USD</td></tr><tr><td>totalValueLockedUSDUntracked</td><td>string</td><td>TVL derived in USD untracked</td></tr><tr><td>poolCount</td><td>string</td><td>Number of pools containing this token</td></tr></tbody></table>


# Token Aggregates (Bars)

Get token aggregates returns real-time or historical candlestick bars for a token.

## Get Token Aggregates (Bars)

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex/{exchange}/{blockchain}/token/{token}/aggregate?timeframe={interval}`

Returns an object of real-time or historical candlesticks (bars) for a token on a decentralized exchange.&#x20;

#### Path Parameters

| Name                                         | Type   | Description                                          |
| -------------------------------------------- | ------ | ---------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark>   | string | Decentralized exchange Id.                           |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain that supports the decentralized exchange. |
| token                                        | string | Token contract address.                              |

#### Query Parameters

| Name                                       | Type   | Description                                                                                                    |
| ------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark>   | string | Your Abyiss API Key.                                                                                           |
| limit                                      | int    | Number of results per request. Maximum 1,0000 (default 100).                                                   |
| orderBy                                    | string | Sort the returned data by any field in the API response, such as `id`, `name`, `symbol`, `volumeUSD` and more. |
| orderDirection                             | string | `asc` or `desc` return the results sorted by that field in either ascending or descending order.               |
| skip                                       | int    | Number of results to skip per request.                                                                         |
| interval<mark style="color:red;">\*</mark> | string | Aggregate bar size. `hour` or `day.`                                                                           |
| from                                       | int    | The start of the aggregate time window for historical data. Unix timestamp in milliseconds.                    |
| to                                         | int    | The end of the aggregate time window for historical data. Unix timestamp in milliseconds.                      |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "timeframe": "day",
    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "name": "Wrapped Ether",
    "symbol": "WETH",
    "TokenAggregates": [
        {
            "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2-19457",
            "timestamp": 1681084800,
            "priceUSD": "1861.812948948509109388355192853743",
            "o": "1863.160356657281537768066137359126",
            "h": "1863.160356657281537768066137359126",
            "l": "1854.198335514748181373337243056372",
            "c": "1861.812948948509109388355192853743",
            "volume": "45669.177692851802160815",
            "volumeUSD": "84911506.50161917605934414103318911",
            "untrackedVolumeUSD": "84911506.50161917605934414103318911",
            "totalValueLocked": "631521.957032934821587711",
            "totalValueLockedUSD": "1175775757.14922204229657038017616",
            "feesUSD": "136802.7673893035106587395801362141"
        },
        {
            "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2-19456",
            "timestamp": 1680998400,
            "priceUSD": "1863.160356657281537768066137359126",
            "o": "1853.838633116650036787389059651635",
            "h": "1869.100132810398674639493628800632",
            "l": "1832.845247207196123319380992497196",
            "c": "1863.160356657281537768066137359126",
            "volume": "183377.010533141634178776",
            "volumeUSD": "338844982.527842179017489089242307",
            "untrackedVolumeUSD": "338844982.527842179017489089242307",
            "totalValueLocked": "630787.710476643156442134",
            "totalValueLockedUSD": "1175258655.626692509388975773585923",
            "feesUSD": "462630.7204260430184761393488914015"
        }
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/aggregate?timeframe=day
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/aggregate?timeframe=day&apiKey="
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/aggregate?timeframe=day&apiKey=")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/aggregate?timeframe=day&apiKey=")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/aggregate?timeframe=day&apiKey=")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/aggregate?timeframe=day&apiKey=>

```json
{
    "timeframe": "day",
    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "name": "Wrapped Ether",
    "symbol": "WETH",
    "TokenAggregates": [
        {
            "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2-19457",
            "timestamp": 1681084800,
            "priceUSD": "1861.812948948509109388355192853743",
            "o": "1863.160356657281537768066137359126",
            "h": "1863.160356657281537768066137359126",
            "l": "1854.198335514748181373337243056372",
            "c": "1861.812948948509109388355192853743",
            "volume": "45669.177692851802160815",
            "volumeUSD": "84911506.50161917605934414103318911",
            "untrackedVolumeUSD": "84911506.50161917605934414103318911",
            "totalValueLocked": "631521.957032934821587711",
            "totalValueLockedUSD": "1175775757.14922204229657038017616",
            "feesUSD": "136802.7673893035106587395801362141"
        },
        {
            "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2-19456",
            "timestamp": 1680998400,
            "priceUSD": "1863.160356657281537768066137359126",
            "o": "1853.838633116650036787389059651635",
            "h": "1869.100132810398674639493628800632",
            "l": "1832.845247207196123319380992497196",
            "c": "1863.160356657281537768066137359126",
            "volume": "183377.010533141634178776",
            "volumeUSD": "338844982.527842179017489089242307",
            "untrackedVolumeUSD": "338844982.527842179017489089242307",
            "totalValueLocked": "630787.710476643156442134",
            "totalValueLockedUSD": "1175258655.626692509388975773585923",
            "feesUSD": "462630.7204260430184761393488914015"
        }
    ]
}
```

### Response Attributes

<table><thead><tr><th width="265.3333333333333">Attribute Name</th><th>Data Type</th><th>Description </th></tr></thead><tbody><tr><td>timeframe</td><td>string</td><td>The Timeframe of the Aggregate bar (Hour or Day)</td></tr><tr><td>id</td><td>string</td><td>Token contact address</td></tr><tr><td>name</td><td>string</td><td>Token name</td></tr><tr><td>symbol</td><td>string</td><td>Token symbol</td></tr><tr><td>id</td><td>string</td><td>Id of the candlestick.</td></tr><tr><td>timestamp</td><td>int</td><td>Unix timestamp of the aggregate bar.</td></tr><tr><td>priceUSD</td><td>string</td><td>The price at the end of the period in USD</td></tr><tr><td>o</td><td>string</td><td>The opening price USD</td></tr><tr><td>h</td><td>string</td><td>The high price USD</td></tr><tr><td>l</td><td>string</td><td>The low price USD</td></tr><tr><td>c</td><td>string</td><td>The close price USD</td></tr><tr><td>volume</td><td>string</td><td>The volume in token units</td></tr><tr><td>volumeUSD</td><td>string</td><td>The volume in derived USD</td></tr><tr><td>untrackedVolumeUSD</td><td>string</td><td>The volume in USD even on pools with less reliable USD valuesThe liquidity across all pools in token units</td></tr><tr><td>totalValueLocked</td><td>string</td><td>The liquidity across all pools in token units</td></tr><tr><td>totalValueLockedUSD</td><td>string</td><td>The liquidity across all pools in derived USD</td></tr><tr><td>feesUSD</td><td>string</td><td>The fees in USD</td></tr></tbody></table>


# Token Trades

Get token trades returns real-time or historical transactions for a token.

## Get Token Trades

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex/{exchange}/{blockchain}/token/{token}/trades`

Returns an object of real-time or historical transactions for a token on a decentralized exchange.

#### Path Parameters

| Name                                         | Type   | Description                                          |
| -------------------------------------------- | ------ | ---------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark>   | string | Decentralized exchange Id                            |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain that supports the decentralized exchange. |
| token<mark style="color:red;">\*</mark>      | string | Token contract address.                              |

#### Query Parameters

| Name                                     | Type    | Description                                                                                                    |
| ---------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark> | string  | Your Abyiss API Key.                                                                                           |
| limit                                    | int     | Number of results per request. Maximum 1,0000 (default 100).                                                   |
| orderBy                                  | string  | Sort the returned data by any field in the API response, such as `id`, `name`, `symbol`, `volumeUSD` and more. |
| orderDirection                           | string  | `asc` or `desc` return the results sorted by that field in either ascending or descending order.               |
| skip                                     | int     | Number of results to skip per request.                                                                         |
| swap                                     | boolean | Set to false to not return swap array.                                                                         |
| mint                                     | boolean | Set to false to not return mint array.                                                                         |
| burn                                     | boolean | Set to false to not return burn array.                                                                         |
| to                                       | int     | The end of the aggregate time window for historical data. Unix timestamp in milliseconds.                      |
| from                                     | int     | The start of the aggregate time window for historical data. Unix timestamp in milliseconds.                    |
| block                                    | int     | The blockchain block number for historical data.                                                               |
| base                                     | boolean | Set to false to not return any arrays with key 'As0' appended.                                                 |
| quote                                    | boolean | Set to false to not return any arrays with key 'As1' appended.                                                 |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "burnsAs0": [
        {
            "id": "0x6dd54d05de948aeed4020a80d96cbe33141e08ca056e3bce9ff5f830a479a72f#12216",
            "amount0": "0.640763031979070073",
            "amount1": "9668376285.524915178789976791",
            "amountUSD": "1764.095549673846551960457267566354",
            "logIndex": "272",
            "origin": "0x525208dd0b56c27bd10703bd675fca0509a17154",
            "timestamp": "1677806459",
            "pool": {
                "token0": {
                    "name": "Wrapped Ether",
                    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "symbol": "WETH"
                },
                "token1": {
                    "name": "PAWSWAP",
                    "id": "0xdc63269ea166b70d4780b3a11f5c825c2b761b01",
                    "symbol": "PAW"
                }
            },
            "transactionId": "0x6dd54d05de948aeed4020a80d96cbe33141e08ca056e3bce9ff5f830a479a72f",
            "amount": "139566126878029687610035",
            "owner": "0xc36442b4a4522e871399cd717abdd847ab11fe88"
        }
    ],
    "burnsAs1": [
        {
            "id": "0xdc3fe821971ed33e296ab649a43a7804ccf2b5c20a1c5c0f06ecb38428f85e92#32385",
            "amount0": "0",
            "amount1": "0",
            "amountUSD": "0",
            "logIndex": "368",
            "origin": "0xd1818a80dac94fa1db124b9b1a1bb71dc20f228d",
            "timestamp": "1677806363",
            "pool": {
                "token0": {
                    "name": "Frax Share",
                    "id": "0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0",
                    "symbol": "FXS"
                },
                "token1": {
                    "name": "Wrapped Ether",
                    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "symbol": "WETH"
                }
            },
            "transactionId": "0xdc3fe821971ed33e296ab649a43a7804ccf2b5c20a1c5c0f06ecb38428f85e92",
            "amount": "0",
            "owner": "0xc36442b4a4522e871399cd717abdd847ab11fe88"
        }
    ],
    "mintsAs0": [
        {
            "id": "0x2aefe4d786d4f8ae16f67383efd19d5a4ffc4cf0bb599f673348ccd477b7f566#12237",
            "amount0": "0.663375770535683083",
            "amount1": "23855798459.50671632017966465",
            "amountUSD": "2802.032003282354183726020735499312",
            "logIndex": "229",
            "origin": "0x525208dd0b56c27bd10703bd675fca0509a17154",
            "timestamp": "1677806831",
            "pool": {
                "token0": {
                    "name": "Wrapped Ether",
                    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "symbol": "WETH"
                },
                "token1": {
                    "name": "PAWSWAP",
                    "id": "0xdc63269ea166b70d4780b3a11f5c825c2b761b01",
                    "symbol": "PAW"
                }
            },
            "transactionId": "0x2aefe4d786d4f8ae16f67383efd19d5a4ffc4cf0bb599f673348ccd477b7f566",
            "amount": "204211770708667193113473",
            "owner": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
            "sender": "0xc36442b4a4522e871399cd717abdd847ab11fe88"
        }
    ],
    "mintsAs1": [
        {
            "id": "0xa5e72d20faee5bd352f087c3a8d64de37124db3fe658abcb160216aaa0e474c6#32386",
            "amount0": "3.560916861043253688",
            "amount1": "0.013838517603100051",
            "amountUSD": "60.90661297105051853347306524867313",
            "logIndex": "250",
            "origin": "0xd1818a80dac94fa1db124b9b1a1bb71dc20f228d",
            "timestamp": "1677806423",
            "pool": {
                "token0": {
                    "name": "Frax Share",
                    "id": "0x3432b6a60d23ca0dfca7761b7ab56459d9c964d0",
                    "symbol": "FXS"
                },
                "token1": {
                    "name": "Wrapped Ether",
                    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "symbol": "WETH"
                }
            },
            "transactionId": "0xa5e72d20faee5bd352f087c3a8d64de37124db3fe658abcb160216aaa0e474c6",
            "amount": "675512064657779058",
            "owner": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
            "sender": "0xc36442b4a4522e871399cd717abdd847ab11fe88"
        }
    ],
    "swapsAs0": [
        {
            "id": "0x9362916811086056d07314328c08354b36d06ff88e90d641ea08f3b33cc67762#2004702",
            "amount0": "-0.612354427081033309",
            "amount1": "1000",
            "amountUSD": "1001.008603810961858938601242554778",
            "logIndex": "12",
            "origin": "0x30c649958a034ac779212f71369441df416ee5e8",
            "timestamp": "1677806351",
            "pool": {
                "token0": {
                    "name": "Wrapped Ether",
                    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "symbol": "WETH"
                },
                "token1": {
                    "name": "Tether USD",
                    "id": "0xdac17f958d2ee523a2206206994597c13d831ec7",
                    "symbol": "USDT"
                }
            },
            "transactionId": "0x9362916811086056d07314328c08354b36d06ff88e90d641ea08f3b33cc67762",
            "recipient": "0xdbc1a433a5ca4ffa184a036a27d3d6322d4ea6f4",
            "sender": "0xef1c6e67703c7bd7107eed8303fbe6ec2554bf6b",
            "sqrtPriceX96": "3200892511195460953817623"
        }
    ],
    "swapsAs1": [
        {
            "id": "0x143a04e8c249c886e974446a169fe308146a6908291f8b8e3477f89b497bfc4b#62193",
            "amount0": "46228.346306409424",
            "amount1": "-12.286385713223357948",
            "amountUSD": "20104.64750424809236613816733545052",
            "logIndex": "26",
            "origin": "0x903c26a3d690bf010fd6441328983925852ffe4c",
            "timestamp": "1677806351",
            "pool": {
                "token0": {
                    "name": "Fantom Token",
                    "id": "0x4e15361fd6b4bb609fa63c81a2be19d873717870",
                    "symbol": "FTM"
                },
                "token1": {
                    "name": "Wrapped Ether",
                    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "symbol": "WETH"
                }
            },
            "transactionId": "0x143a04e8c249c886e974446a169fe308146a6908291f8b8e3477f89b497bfc4b",
            "recipient": "0x000000000dfde7deaf24138722987c9a6991e2d4",
            "sender": "0x000000000dfde7deaf24138722987c9a6991e2d4",
            "sqrtPriceX96": "1295321746504811986688003350"
        }
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/trades
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/trades?apiKey="
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/trades?apiKey=")
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/trades?apiKey=")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/trades?apiKey=")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/dex/uniswap/ethereum/token/0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2/trades?apiKey=>

```json
{
    "token": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
    "burnsAs0": [
        {
            "id": "0x6dd54d05de948aeed4020a80d96cbe33141e08ca056e3bce9ff5f830a479a72f#12216",
            "amount0": "0.640763031979070073",
            "amount1": "9668376285.524915178789976791",
            "amountUSD": "1764.095549673846551960457267566354",
            "logIndex": "272",
            "origin": "0x525208dd0b56c27bd10703bd675fca0509a17154",
            "timestamp": "1677806459",
            "pool": {
                "token0": {
                    "name": "Wrapped Ether",
                    "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
                    "symbol": "WETH"
                },
                "token1": {
                    "name": "PAWSWAP",
                    "id": "0xdc63269ea166b70d4780b3a11f5c825c2b761b01",
                    "symbol": "PAW"
                }
            },
            "transactionId": "0x6dd54d05de948aeed4020a80d96cbe33141e08ca056e3bce9ff5f830a479a72f",
            "amount": "139566126878029687610035",
            "owner": "0xc36442b4a4522e871399cd717abdd847ab11fe88"
        }
    ],
    "burnsAs1": [
    ],
    "mintsAs0": [
    ],
    "mintsAs1": [
    ],
    "swapsAs0": [
    ],
    "swapsAs1": [
    ],
}
```

### Response Attributes

<table><thead><tr><th width="265.3333333333333">Attribute Name</th><th width="241">Data Type</th><th>Description </th></tr></thead><tbody><tr><td>token</td><td>string</td><td>Contract address of the token.</td></tr><tr><td>burnsAs0</td><td>object</td><td>Transaction where the token was burned as token 0.</td></tr><tr><td>burnsAs1</td><td>object</td><td>Transaction where the token was burned as token 1.</td></tr><tr><td>mintsAs0</td><td>object</td><td>Transaction where the token was minted as token 0.</td></tr><tr><td>mintsAs1</td><td>object</td><td>Transaction where the token was minted as token 1.</td></tr><tr><td>swapsAs0</td><td>object</td><td>Transaction where the token was swaped as token 0.</td></tr><tr><td>swapsAs1</td><td>object</td><td>Transaction where the token was swaped as token 1.</td></tr><tr><td>id</td><td>string</td><td>Transaction hash + "#" + index in Transaction array</td></tr><tr><td>amount0</td><td>string</td><td>Amount of token 0</td></tr><tr><td>amount1</td><td>string</td><td>Amount of token 1</td></tr><tr><td>amountUSD</td><td>string</td><td>Derived amount based on available prices of tokens</td></tr><tr><td>logIndex</td><td>string</td><td>Position within the transactions</td></tr><tr><td>origin</td><td>string</td><td>Transaction origin</td></tr><tr><td>timestamp</td><td>string</td><td>Timestamp of the transaction.</td></tr><tr><td>pool</td><td>string</td><td>Liquidity pool that the transaction occurred in.</td></tr><tr><td>token0</td><td>string</td><td>Token 0 in the pool.</td></tr><tr><td>token1</td><td>string</td><td>Token 1 in the pool.</td></tr><tr><td>name</td><td>string</td><td>Name of the token.</td></tr><tr><td>id</td><td>string</td><td>Contract address of the token.</td></tr><tr><td>symbol</td><td>string</td><td>Symbol of the token.</td></tr><tr><td>transactionId</td><td>string</td><td>The transaction id. </td></tr><tr><td>amount</td><td>string</td><td>Amount of liquidity. </td></tr><tr><td>owner</td><td>string</td><td>Owner of position.</td></tr></tbody></table>


# Pools

Get pools returns real-time or historical liquidity pool information.

## Get Pools

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex/{exchange}/{blockchain}/pools`

Returns an array of real-time or historical liquidity pool data on a decentralized exchange.

#### Path Parameters

| Name                                         | Type   | Description                           |
| -------------------------------------------- | ------ | ------------------------------------- |
| exchange<mark style="color:red;">\*</mark>   | string | Decentralized exchange Id             |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain for decentralized exchange |

#### Query Parameters

| Name                                     | Type   | Description                                                                                                    |
| ---------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key                                                                                            |
| block                                    | string | The blockchain block number for historical data.                                                               |
| orderDirection                           | string | `asc` or `desc` return the results sorted by that field in either ascending or descending order.               |
| limit                                    | int    | Number of results per request. Maximum 1,0000 (default 100).                                                   |
| skip                                     | int    | Number of results to skip per request.                                                                         |
| orderBy                                  | string | Sort the returned data by any field in the API response, such as `id`, `name`, `symbol`, `volumeUSD` and more. |
| pool                                     | string | Pool contract address.                                                                                         |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
    {
        "id": "0x079e7a44f42e9cd2442c3b9536244be634e8f888",
        "createdAtBlockNumber": "13946834",
        "createdAtTimestamp": "1657313501",
        "feeGrowthGlobal0X128": "33523166756957040825870650430606840539",
        "feeGrowthGlobal1X128": "22063097588048839229216940673559101699",
        "feeTier": "3000",
        "feesUSD": "41186.94681670499373145428075267476",
        "liquidity": "275259128840772456455165",
        "liquidityProviderCount": "0",
        "observationIndex": "0",
        "sqrtPrice": "65362472457790533497927346876",
        "tick": "-3848",
        "token0Price": "1.469272072774257022696235099374057",
        "token1Price": "0.6806091387225616540765640838845884",
        "totalValueLockedToken0": "142039.789600282692041837",
        "totalValueLockedETH": "263008.053681041453909217827219603",
        "totalValueLockedToken1": "82332.106028768612285469",
        "totalValueLockedUSD": "179005.6848929508851906505477017337",
        "totalValueLockedUSDUntracked": "0",
        "txCount": "104626",
        "volumeUSD": "13728982.27223499791048476025089143",
        "volumeToken1": "13728566.48633066654357228",
        "volumeToken0": "18460880.139639477926207025",
        "untrackedVolumeUSD": "13728982.27223499791048476025089143",
        "token0": {
            "id": "0x471ece3750da237f93b8e339c536989b8978a438",
            "name": "Celo native asset",
            "symbol": "CELO",
            "decimals": "18",
            "supply": "17944",
            "totalValueLocked": "374576.456855717828257672",
            "totalValueLockedUSD": "254940.1596863188857054923984137805",
            "volume": "23767113.778304894745609846",
            "volumeUSD": "17407269.47751284527203886578825922",
            "untrackedVolumeUSD": "17406491.72059735368630709682542912",
            "txCount": "174411",
            "derivedETH": "1",
            "feesUSD": "52513.09229442114283010429308286935",
            "poolCount": "0"
        },
        "token1": {
            "id": "0x765de816845861e75a25fca122bb6898b8b1282a",
            "name": "Celo Dollar",
            "symbol": "cUSD",
            "decimals": "18",
            "supply": "19016",
            "totalValueLocked": "877370.388895971647748686",
            "totalValueLockedUSD": "877370.3888959716477486859999999994",
            "volume": "33020496.407084955037673747",
            "volumeUSD": "33019355.07616878761990110619958443",
            "untrackedVolumeUSD": "33019086.25410862590614718721990349",
            "txCount": "251660",
            "derivedETH": "1.469272072774257022696235099374057",
            "feesUSD": "55320.67186157799866500784717264333",
            "poolCount": "0"
        }
    }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap/ethereum/pools
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/dex/uniswap/ethereum/pools?apiKey="
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/dex/uniswap/ethereum/pools?apiKey=")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/dex/uniswap/ethereum/pools?apiKey=")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex/uniswap/ethereum/pools?apiKey=")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/dex/uniswap/ethereum/pools?apiKey=>

```json
[
    {
        "id": "0x079e7a44f42e9cd2442c3b9536244be634e8f888",
        "createdAtBlockNumber": "13946834",
        "createdAtTimestamp": "1657313501",
        "feeGrowthGlobal0X128": "33523166756957040825870650430606840539",
        "feeGrowthGlobal1X128": "22063097588048839229216940673559101699",
        "feeTier": "3000",
        "feesUSD": "41186.94681670499373145428075267476",
        "liquidity": "275259128840772456455165",
        "liquidityProviderCount": "0",
        "observationIndex": "0",
        "sqrtPrice": "65362472457790533497927346876",
        "tick": "-3848",
        "token0Price": "1.469272072774257022696235099374057",
        "token1Price": "0.6806091387225616540765640838845884",
        "totalValueLockedToken0": "142039.789600282692041837",
        "totalValueLockedETH": "263008.053681041453909217827219603",
        "totalValueLockedToken1": "82332.106028768612285469",
        "totalValueLockedUSD": "179005.6848929508851906505477017337",
        "totalValueLockedUSDUntracked": "0",
        "txCount": "104626",
        "volumeUSD": "13728982.27223499791048476025089143",
        "volumeToken1": "13728566.48633066654357228",
        "volumeToken0": "18460880.139639477926207025",
        "untrackedVolumeUSD": "13728982.27223499791048476025089143",
        "token0": {
            "id": "0x471ece3750da237f93b8e339c536989b8978a438",
            "name": "Celo native asset",
            "symbol": "CELO",
            "decimals": "18",
            "supply": "17944",
            "totalValueLocked": "374576.456855717828257672",
            "totalValueLockedUSD": "254940.1596863188857054923984137805",
            "volume": "23767113.778304894745609846",
            "volumeUSD": "17407269.47751284527203886578825922",
            "untrackedVolumeUSD": "17406491.72059735368630709682542912",
            "txCount": "174411",
            "derivedETH": "1",
            "feesUSD": "52513.09229442114283010429308286935",
            "poolCount": "0"
        },
        "token1": {
            "id": "0x765de816845861e75a25fca122bb6898b8b1282a",
            "name": "Celo Dollar",
            "symbol": "cUSD",
            "decimals": "18",
            "supply": "19016",
            "totalValueLocked": "877370.388895971647748686",
            "totalValueLockedUSD": "877370.3888959716477486859999999994",
            "volume": "33020496.407084955037673747",
            "volumeUSD": "33019355.07616878761990110619958443",
            "untrackedVolumeUSD": "33019086.25410862590614718721990349",
            "txCount": "251660",
            "derivedETH": "1.469272072774257022696235099374057",
            "feesUSD": "55320.67186157799866500784717264333",
            "poolCount": "0"
        }
    }
]
```

### Response Attributes

| Attribute Name               | Data Type | Description                                               |
| ---------------------------- | --------- | --------------------------------------------------------- |
| id                           | string    | Pool contract address                                     |
| createdAtBlockNumber         | string    | Block pool was created at                                 |
| createdAtTimestamp           | string    | Timestamp pool was created at                             |
| feeGrowthGlobal0X128         | string    | Tracker for global fee growth                             |
| feeGrowthGlobal1X128         | string    | Tracker for global fee growth                             |
| feeTier                      | string    | Fee amount                                                |
| feesUSD                      | string    | Fees in USD                                               |
| liquidity                    | string    | In range liquidity                                        |
| liquidityProviderCount       | string    | used to detect new exchanges                              |
| observationIndex             | string    | Current observation index                                 |
| sqrtPrice                    | string    | current price tracker                                     |
| tick                         | string    | current tick                                              |
| token0Price                  | string    | token0 per token1                                         |
| token1Price                  | string    | token1 per token0                                         |
| totalValueLockedToken0       | string    | total token 0 across all ticks                            |
| totalValueLockedETH          | string    | tvl derived ETH                                           |
| totalValueLockedToken1       | string    | total token 1 across all ticks                            |
| totalValueLockedUSD          | string    | tvl USD                                                   |
| totalValueLockedUSDUntracked | string    | TVL derived in USD untracked                              |
| txCount                      | string    | all time number of transactions                           |
| volumeUSD                    | string    | all time USD swapped                                      |
| volumeToken1                 | string    | all time token1 swapped                                   |
| volumeToken0                 | string    | all time token0 swapped                                   |
| untrackedVolumeUSD           | string    | all time USD swapped, unfiltered for unreliable USD pools |
| token0                       | string    | token0                                                    |
| token1                       | string    | token1                                                    |
| id                           | string    | Token contract address                                    |
| name                         | string    | Token name                                                |
| symbol                       | string    | Token symbol                                              |
| decimals                     | string    | token decimals                                            |
| supply                       | string    | token total supply                                        |
| totalValueLocked             | string    | liquidity in token units                                  |
| totalValueLockedUSD          | string    | liquidity in derived USD                                  |
| volume                       | string    | volume in token units                                     |
| volumeUSD                    | string    | volume in derived USD                                     |
| untrackedVolumeUSD           | string    | volume in USD even on pools with less reliable USD values |
| txCount                      | string    | transactions across all pools that include this token     |
| derivedETH                   | string    | derived price in ETH                                      |
| feesUSD                      | string    | fees in USD                                               |
| poolCount                    | string    | number of pools containing this token                     |


# Pool Data

Get pools returns real-time or historical liquidity pool information.

## Get Pool Data

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex/{exchange}/{blockchain}/pool/{pool}`

Returns an object of real-time or historical liquidity pool data on a decentralized exchange.

#### Path Parameters

| Name                                         | Type   | Description                           |
| -------------------------------------------- | ------ | ------------------------------------- |
| exchange<mark style="color:red;">\*</mark>   | string | Decentralized exchange Id             |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain for decentralized exchange |
| pool<mark style="color:red;">\*</mark>       | string | Pool contract address.                |

#### Query Parameters

| Name                                     | Type   | Description                                      |
| ---------------------------------------- | ------ | ------------------------------------------------ |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key                              |
| block                                    | string | The blockchain block number for historical data. |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
    "createdAtBlockNumber": "12376729",
    "createdAtTimestamp": "1620250931",
    "feeGrowthGlobal0X128": "2339213828374794064772733186730511",
    "feeGrowthGlobal1X128": "1124563782191130285774006530912913360543821",
    "feeTier": "500",
    "feesUSD": "181745183.4919135479914293522951478",
    "liquidity": "28305971624606501584",
    "liquidityProviderCount": "0",
    "observationIndex": "0",
    "sqrtPrice": "1835788354854154061139441696943417",
    "tick": "201023",
    "token0Price": "1862.575758240059621582586480287811",
    "token1Price": "0.0005368909133365377831323097821773732",
    "totalValueLockedToken0": "238462791.284252",
    "totalValueLockedETH": "239468.5785032713504558275883499686",
    "totalValueLockedToken1": "111383.712791182627800798",
    "totalValueLockedUSD": "445832107.7770593355521122003026959",
    "totalValueLockedUSDUntracked": "0",
    "txCount": "4757298",
    "volumeUSD": "363490366983.8270959828587045902679",
    "volumeToken1": "173984279.507713960124759536",
    "volumeToken0": "363465170602.234639",
    "untrackedVolumeUSD": "363490366983.8270959828587045902679",
    "token0": {
        "id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "name": "USD Coin",
        "symbol": "USDC",
        "decimals": "6",
        "supply": "19312",
        "totalValueLocked": "707789671.655521",
        "totalValueLockedUSD": "707789671.6555209999999999999999999",
        "volume": "594284344988.549264",
        "volumeUSD": "594132695519.3544168842644818168896",
        "untrackedVolumeUSD": "593933640776.891916756840567652356",
        "txCount": "9459463",
        "derivedETH": "0.0005371272600739174638130374035007628",
        "feesUSD": "542209018.6537476591450399921439473",
        "poolCount": "0"
    },
    "token1": {
        "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "name": "Wrapped Ether",
        "symbol": "WETH",
        "decimals": "18",
        "supply": "19848",
        "totalValueLocked": "630444.275881665783438372",
        "totalValueLockedUSD": "1173733531.593437237928802029139364",
        "volume": "344093461.934212462042438875",
        "volumeUSD": "753761660033.2402028813427752717856",
        "untrackedVolumeUSD": "418002379998220.6202981897849956904",
        "txCount": "24829241",
        "derivedETH": "1",
        "feesUSD": "1205941841.69999761982134759117516",
        "poolCount": "0"
    }
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640?apiKey="
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640?apiKey=")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640?apiKey=")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640?apiKey=")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640?apiKey=>

```json
{
    "id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
    "createdAtBlockNumber": "12376729",
    "createdAtTimestamp": "1620250931",
    "feeGrowthGlobal0X128": "2339213828374794064772733186730511",
    "feeGrowthGlobal1X128": "1124563782191130285774006530912913360543821",
    "feeTier": "500",
    "feesUSD": "181745183.4919135479914293522951478",
    "liquidity": "28305971624606501584",
    "liquidityProviderCount": "0",
    "observationIndex": "0",
    "sqrtPrice": "1835788354854154061139441696943417",
    "tick": "201023",
    "token0Price": "1862.575758240059621582586480287811",
    "token1Price": "0.0005368909133365377831323097821773732",
    "totalValueLockedToken0": "238462791.284252",
    "totalValueLockedETH": "239468.5785032713504558275883499686",
    "totalValueLockedToken1": "111383.712791182627800798",
    "totalValueLockedUSD": "445832107.7770593355521122003026959",
    "totalValueLockedUSDUntracked": "0",
    "txCount": "4757298",
    "volumeUSD": "363490366983.8270959828587045902679",
    "volumeToken1": "173984279.507713960124759536",
    "volumeToken0": "363465170602.234639",
    "untrackedVolumeUSD": "363490366983.8270959828587045902679",
    "token0": {
        "id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "name": "USD Coin",
        "symbol": "USDC",
        "decimals": "6",
        "supply": "19312",
        "totalValueLocked": "707789671.655521",
        "totalValueLockedUSD": "707789671.6555209999999999999999999",
        "volume": "594284344988.549264",
        "volumeUSD": "594132695519.3544168842644818168896",
        "untrackedVolumeUSD": "593933640776.891916756840567652356",
        "txCount": "9459463",
        "derivedETH": "0.0005371272600739174638130374035007628",
        "feesUSD": "542209018.6537476591450399921439473",
        "poolCount": "0"
    },
    "token1": {
        "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "name": "Wrapped Ether",
        "symbol": "WETH",
        "decimals": "18",
        "supply": "19848",
        "totalValueLocked": "630444.275881665783438372",
        "totalValueLockedUSD": "1173733531.593437237928802029139364",
        "volume": "344093461.934212462042438875",
        "volumeUSD": "753761660033.2402028813427752717856",
        "untrackedVolumeUSD": "418002379998220.6202981897849956904",
        "txCount": "24829241",
        "derivedETH": "1",
        "feesUSD": "1205941841.69999761982134759117516",
        "poolCount": "0"
    }
}
```

### Response Attributes

| Attribute Name               | Data Type | Description                                               |
| ---------------------------- | --------- | --------------------------------------------------------- |
| id                           | string    | Pool contract address                                     |
| createdAtBlockNumber         | string    | Block pool was created at                                 |
| createdAtTimestamp           | string    | Timestamp pool was created at                             |
| feeGrowthGlobal0X128         | string    | Tracker for global fee growth                             |
| feeGrowthGlobal1X128         | string    | Tracker for global fee growth                             |
| feeTier                      | string    | Fee amount                                                |
| feesUSD                      | string    | Fees in USD                                               |
| liquidity                    | string    | In range liquidity                                        |
| liquidityProviderCount       | string    | used to detect new exchanges                              |
| observationIndex             | string    | Current observation index                                 |
| sqrtPrice                    | string    | current price tracker                                     |
| tick                         | string    | current tick                                              |
| token0Price                  | string    | token0 per token1                                         |
| token1Price                  | string    | token1 per token0                                         |
| totalValueLockedToken0       | string    | total token 0 across all ticks                            |
| totalValueLockedETH          | string    | tvl derived ETH                                           |
| totalValueLockedToken1       | string    | total token 1 across all ticks                            |
| totalValueLockedUSD          | string    | tvl USD                                                   |
| totalValueLockedUSDUntracked | string    | TVL derived in USD untracked                              |
| txCount                      | string    | all time number of transactions                           |
| volumeUSD                    | string    | all time USD swapped                                      |
| volumeToken1                 | string    | all time token1 swapped                                   |
| volumeToken0                 | string    | all time token0 swapped                                   |
| untrackedVolumeUSD           | string    | all time USD swapped, unfiltered for unreliable USD pools |
| token0                       | string    | token0                                                    |
| token1                       | string    | token1                                                    |
| id                           | string    | Token contract address                                    |
| name                         | string    | Token name                                                |
| symbol                       | string    | Token symbol                                              |
| decimals                     | string    | token decimals                                            |
| supply                       | string    | token total supply                                        |
| totalValueLocked             | string    | liquidity in token units                                  |
| totalValueLockedUSD          | string    | liquidity in derived USD                                  |
| volume                       | string    | volume in token units                                     |
| volumeUSD                    | string    | volume in derived USD                                     |
| untrackedVolumeUSD           | string    | volume in USD even on pools with less reliable USD values |
| txCount                      | string    | transactions across all pools that include this token     |
| derivedETH                   | string    | derived price in ETH                                      |
| feesUSD                      | string    | fees in USD                                               |
| poolCount                    | string    | number of pools containing this token                     |


# Pool Aggregates (Bars)

Get pool aggregates returns real-time or historical candlestick bars for a liquidity pool.

## Get Liquidity Pool Aggregates (Bars)

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex/{exchange}/{blockchain}/pool/{pool}/aggregate?timeframe={interval}`

Returns an object of real-time or historical candlestick bars for a liquidity pool on a decentralized exchange.&#x20;

#### Path Parameters

| Name                                         | Type   | Description                                          |
| -------------------------------------------- | ------ | ---------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark>   | string | Decentralized exchange Id                            |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain that supports the decentralized exchange. |
| pool<mark style="color:red;">\*</mark>       | string | Liquidity Pool contract address.                     |

#### Query Parameters

| Name                                       | Type   | Description                                                                                                    |
| ------------------------------------------ | ------ | -------------------------------------------------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark>   | string | Your Abyiss API Key                                                                                            |
| limit                                      | int    | Number of results per request. Maximum 1,0000 (default 100)                                                    |
| orderBy                                    | string | Sort the returned data by any field in the API response, such as `id`, `name`, `symbol`, `volumeUSD` and more. |
| orderDirection                             | string | `asc` or `desc` return the results sorted by that field in either ascending or descending order                |
| skip                                       | int    | Number of results to skip per request.                                                                         |
| interval<mark style="color:red;">\*</mark> | string | Aggregate bar size. `hour` or `day`                                                                            |
| to                                         | int    | The end of the aggregate time window for historical data. Unix timestamp in milliseconds.                      |
| from                                       | int    | The start of the aggregate time window for historical data. Unix timestamp in milliseconds.                    |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "timeframe": "day",
    "token0": {
        "name": "USD Coin",
        "id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "symbol": "USDC"
    },
    "token1": {
        "name": "Wrapped Ether",
        "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "symbol": "WETH"
    },
    "poolAggregates": [
        {
            "id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640-19457",
            "timestamp": 1681084800,
            "feeGrowthGlobal0X128": "2339213968916729531223096419274296",
            "feeGrowthGlobal1X128": "1124565708862364413358919226291694974818769",
            "feesUSD": "24570.19489506981696256671263525303",
            "o": "1861.229249917124425671059978055896",
            "h": "1866.129826859531905327345582770674",
            "l": "1849.588545028402903627911445772043",
            "c": "1861.229249917124425671059978055896",
            "volumeUSD": "49140389.79013963392513342527050604",
            "volumeToken0": "49134098.465595",
            "volumeToken1": "26424.102167136654514951",
            "token0Price": "1860.821468497617504272633341910774",
            "token1Price": "0.0005373970673325130686586439093719616",
            "liquidity": "28359865230079992268",
            "txCount": "1946",
            "tvlUSD": "445832755.5937852890879586310030789",
            "sqrtPrice": "1836653495884466183644038654704998",
            "tick": "201032"
        },
        {
            "id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640-19456",
            "timestamp": 1680998400,
            "feeGrowthGlobal0X128": "2339079716985510919254387473263998",
            "feeGrowthGlobal1X128": "1124493096642505157141501076316955741370453",
            "feesUSD": "97638.63554132466059685342601960951",
            "o": "1850.396710419790204337751969898761",
            "h": "1873.596532314986342851627620643428",
            "l": "1828.321888992128176916756588291294",
            "c": "1850.396710419790204337751969898761",
            "volumeUSD": "195277271.0826493211937068520392203",
            "volumeToken0": "195303846.783318",
            "volumeToken1": "105673.156917704060998814",
            "token0Price": "1861.217048228268273911189536461615",
            "token1Price": "0.0005372828499244196538466630433087226",
            "liquidity": "28271708994189162991",
            "txCount": "4708",
            "tvlUSD": "446136840.2157276077963775647371453",
            "sqrtPrice": "1836458305993924899300320848785481",
            "tick": "201030"
        }
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day&apiKey="
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day&apiKey=")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day&apiKey=")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day&apiKey=")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/aggregate?timeframe=day&apiKey=>

```json
{
    "timeframe": "day",
    "token0": {
        "name": "USD Coin",
        "id": "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
        "symbol": "USDC"
    },
    "token1": {
        "name": "Wrapped Ether",
        "id": "0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
        "symbol": "WETH"
    },
    "poolAggregates": [
        {
            "id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640-19457",
            "timestamp": 1681084800,
            "feeGrowthGlobal0X128": "2339213968916729531223096419274296",
            "feeGrowthGlobal1X128": "1124565708862364413358919226291694974818769",
            "feesUSD": "24570.19489506981696256671263525303",
            "o": "1861.229249917124425671059978055896",
            "h": "1866.129826859531905327345582770674",
            "l": "1849.588545028402903627911445772043",
            "c": "1861.229249917124425671059978055896",
            "volumeUSD": "49140389.79013963392513342527050604",
            "volumeToken0": "49134098.465595",
            "volumeToken1": "26424.102167136654514951",
            "token0Price": "1860.821468497617504272633341910774",
            "token1Price": "0.0005373970673325130686586439093719616",
            "liquidity": "28359865230079992268",
            "txCount": "1946",
            "tvlUSD": "445832755.5937852890879586310030789",
            "sqrtPrice": "1836653495884466183644038654704998",
            "tick": "201032"
        },
        {
            "id": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640-19456",
            "timestamp": 1680998400,
            "feeGrowthGlobal0X128": "2339079716985510919254387473263998",
            "feeGrowthGlobal1X128": "1124493096642505157141501076316955741370453",
            "feesUSD": "97638.63554132466059685342601960951",
            "o": "1850.396710419790204337751969898761",
            "h": "1873.596532314986342851627620643428",
            "l": "1828.321888992128176916756588291294",
            "c": "1850.396710419790204337751969898761",
            "volumeUSD": "195277271.0826493211937068520392203",
            "volumeToken0": "195303846.783318",
            "volumeToken1": "105673.156917704060998814",
            "token0Price": "1861.217048228268273911189536461615",
            "token1Price": "0.0005372828499244196538466630433087226",
            "liquidity": "28271708994189162991",
            "txCount": "4708",
            "tvlUSD": "446136840.2157276077963775647371453",
            "sqrtPrice": "1836458305993924899300320848785481",
            "tick": "201030"
        }
    ]
}
```

### Response Attributes

<table><thead><tr><th width="265.3333333333333">Attribute Name</th><th>Data Type</th><th>Description </th></tr></thead><tbody><tr><td>timeframe</td><td>string</td><td>The Timeframe of the Aggregate bar (<code>Hour</code> or <code>Day</code>)</td></tr><tr><td>token0</td><td>string</td><td>Token 0 in the pool</td></tr><tr><td>token1</td><td>string</td><td>Token 1 in the pool</td></tr><tr><td>name</td><td>string</td><td>Token name</td></tr><tr><td>id</td><td>string</td><td>Token contract address id</td></tr><tr><td>symbol</td><td>string</td><td>Token symbol</td></tr><tr><td>id</td><td>string</td><td>Id of the candlestick.</td></tr><tr><td>timestamp</td><td>string</td><td>Timestamp rounded to current day by dividing by 86400</td></tr><tr><td>feeGrowthGlobal0X128</td><td>string</td><td>Tracker for global fee growth</td></tr><tr><td>feeGrowthGlobal1X128</td><td>string</td><td>Tracker for global fee growth</td></tr><tr><td>feesUSD</td><td>string</td><td>Fees in USD</td></tr><tr><td>o</td><td>string</td><td>Opening price of token0</td></tr><tr><td>h</td><td>string</td><td>High price of token0</td></tr><tr><td>l</td><td>string</td><td>Low price of token0</td></tr><tr><td>c</td><td>string</td><td>Close price of token0</td></tr><tr><td>volumeUSD</td><td>string</td><td>Volume in USD</td></tr><tr><td>volumeToken0</td><td>string</td><td>Volume in token0</td></tr><tr><td>volumeToken1</td><td>string</td><td>Volume in token1</td></tr><tr><td>token0Price</td><td>string</td><td>Price of token0 - derived from sqrtPrice</td></tr><tr><td>token1Price</td><td>string</td><td>Price of token1 - derived from sqrtPrice</td></tr><tr><td>liquidity</td><td>string</td><td>In-range liquidity at end of period</td></tr><tr><td>txCount</td><td>string</td><td>Number of transactions during period</td></tr><tr><td>tvlUSD</td><td>string</td><td>The total value locked in USD at the end of the period.</td></tr><tr><td>sqrtPrice</td><td>string</td><td>Current price tracker at end of period</td></tr><tr><td>tick</td><td>string</td><td>Current tick at end of period</td></tr></tbody></table>


# Pool Trades

Get pool trades returns real-time or historical transactions for a pool.

## Get Pool Trades

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex/{exchange}/{blockchain}/pool/{pool}/trades`

Returns an object of real-time or historical transactions for a pool on a decentralized exchange.

#### Path Parameters

| Name                                         | Type   | Description                                          |
| -------------------------------------------- | ------ | ---------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark>   | string | Decentralized exchange Id                            |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain that supports the decentralized exchange. |
| pool<mark style="color:red;">\*</mark>       | string | Pool contract address.                               |

#### Query Parameters

| Name                                     | Type    | Description                                                                                                    |
| ---------------------------------------- | ------- | -------------------------------------------------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark> | string  | Your Abyiss API Key.                                                                                           |
| limit                                    | int     | Number of results per request. Maximum 1,0000 (default 100).                                                   |
| orderBy                                  | string  | Sort the returned data by any field in the API response, such as `id`, `name`, `symbol`, `volumeUSD` and more. |
| orderDirection                           | string  | `asc` or `desc` return the results sorted by that field in either ascending or descending order.               |
| skip                                     | int     | Number of results to skip per request.                                                                         |
| swap                                     | boolean | Set to false to not return swap array.                                                                         |
| mint                                     | boolean | Set to false to not return mint array.                                                                         |
| burn                                     | boolean | Set to false to not return burn array.                                                                         |
| to                                       | int     | The end of the aggregate time window for historical data. Unix timestamp in milliseconds.                      |
| from                                     | int     | The start of the aggregate time window for historical data. Unix timestamp in milliseconds.                    |
| block                                    | int     | The blockchain block number for historical data.                                                               |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "poolAddress": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
    "burns": [
        {
            "id": "0x7258050fbb90fa41f73505c552a973113ffc87c67ddd19b37dff7adb6bded18e#3",
            "amount0": "2588.187276",
            "amount1": "0.931484249884373906",
            "amountUSD": "5856.678575459276743008030298541704",
            "logIndex": "122",
            "origin": "0xb2ef52180d1e5f4835f4e343251286fa84743456",
            "timestamp": "1620253661",
            "amount": "310565794229424",
            "owner": "0xc36442b4a4522e871399cd717abdd847ab11fe88"
        }
    ],
    "mints": [
        {
            "id": "0x125e0b641d4a4b08806bf52c0c6757648c9963bcda8681e4f996f09e00d4c2cc#1",
            "amount0": "2995.507735",
            "amount1": "0.999999999871526563",
            "amountUSD": "6424.90529371289423696173129469554",
            "logIndex": "106",
            "origin": "0xb2ef52180d1e5f4835f4e343251286fa84743456",
            "timestamp": "1620250931",
            "amount": "345073104699360",
            "owner": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
            "sender": "0xc36442b4a4522e871399cd717abdd847ab11fe88"
        }
    ],
    "swaps": [
        {
            "id": "0x0804ff007263a885191f23c808a9346e62d502a1fc23be82eb14052408d76ae2#2",
            "amount0": "-119.744094",
            "amount1": "0.035",
            "amountUSD": "119.2881007156144668372176276273185",
            "logIndex": "73",
            "origin": "0x4a12b86c7c0270443760fe85c7d1e6bc62f78e4e",
            "timestamp": "1620252901",
            "recipient": "0xe592427a0aece92de3edee1f18e0157c05861564",
            "sender": "0xe592427a0aece92de3edee1f18e0157c05861564",
            "sqrtPriceX96": "1358206768703179146794161129278934"
        }
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/trades
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/trades?apiKey="
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/trades?apiKey=")
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/trades?apiKey=")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/trades?apiKey=")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v2/dex/uniswap/ethereum/pool/0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640/trades?apiKey=>

```json
{
    "poolAddress": "0x88e6a0c2ddd26feeb64f039a2c41296fcb3f5640",
    "burns": [
        {
            "id": "0x7258050fbb90fa41f73505c552a973113ffc87c67ddd19b37dff7adb6bded18e#3",
            "amount0": "2588.187276",
            "amount1": "0.931484249884373906",
            "amountUSD": "5856.678575459276743008030298541704",
            "logIndex": "122",
            "origin": "0xb2ef52180d1e5f4835f4e343251286fa84743456",
            "timestamp": "1620253661",
            "amount": "310565794229424",
            "owner": "0xc36442b4a4522e871399cd717abdd847ab11fe88"
        }
    ],
    "mints": [
        {
            "id": "0x125e0b641d4a4b08806bf52c0c6757648c9963bcda8681e4f996f09e00d4c2cc#1",
            "amount0": "2995.507735",
            "amount1": "0.999999999871526563",
            "amountUSD": "6424.90529371289423696173129469554",
            "logIndex": "106",
            "origin": "0xb2ef52180d1e5f4835f4e343251286fa84743456",
            "timestamp": "1620250931",
            "amount": "345073104699360",
            "owner": "0xc36442b4a4522e871399cd717abdd847ab11fe88",
            "sender": "0xc36442b4a4522e871399cd717abdd847ab11fe88"
        }
    ],
    "swaps": [
        {
            "id": "0x0804ff007263a885191f23c808a9346e62d502a1fc23be82eb14052408d76ae2#2",
            "amount0": "-119.744094",
            "amount1": "0.035",
            "amountUSD": "119.2881007156144668372176276273185",
            "logIndex": "73",
            "origin": "0x4a12b86c7c0270443760fe85c7d1e6bc62f78e4e",
            "timestamp": "1620252901",
            "recipient": "0xe592427a0aece92de3edee1f18e0157c05861564",
            "sender": "0xe592427a0aece92de3edee1f18e0157c05861564",
            "sqrtPriceX96": "1358206768703179146794161129278934"
        }
    ]
}
```

### Response Attributes

<table><thead><tr><th width="265.3333333333333">Attribute Name</th><th width="241">Data Type</th><th>Description </th></tr></thead><tbody><tr><td>poolAddress</td><td>string</td><td>Contract address of the pool.</td></tr><tr><td>burns</td><td>object</td><td>Transaction type where tokens where burned or destroyed.</td></tr><tr><td>mints</td><td>object</td><td>Transaction type where tokens where minted or created.</td></tr><tr><td>swaps</td><td>object</td><td>Transaction type where tokens where swaped or traded.</td></tr><tr><td>id</td><td>string</td><td>Transaction hash + "#" + index in Transaction array</td></tr><tr><td>amount0</td><td>string</td><td>Amount of token 0</td></tr><tr><td>amount1</td><td>string</td><td>Amount of token 1</td></tr><tr><td>amountUSD</td><td>string</td><td>Derived amount based on available prices of tokens</td></tr><tr><td>logIndex</td><td>string</td><td>Position within the transactions</td></tr><tr><td>origin</td><td>string</td><td>Transaction origin</td></tr><tr><td>timestamp</td><td>string</td><td>Timestamp of the transaction.</td></tr><tr><td>amount</td><td>string</td><td>amount of liquidity</td></tr><tr><td>owner</td><td>string</td><td>owner of the position</td></tr><tr><td>sender</td><td>string</td><td>Sender of the transaction</td></tr><tr><td>recipient</td><td>string</td><td>Recipient of the transaction</td></tr><tr><td>sqrtPriceX96</td><td>string</td><td>The sqrt(price) of the pool after the swap, as a Q64.96</td></tr></tbody></table>


# Token Search

Search for real-time or historical token information and logos.

{% hint style="danger" %}
**The endpoint is in alpha. We do not recommend use for production.**&#x20;
{% endhint %}

## Get Tokens Logos

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/dex/{exchange}/{blockchain}/tokens`

Returns an array of real-time or historical token data on a decentralized exchange.&#x20;

#### Path Parameters

| Name                                         | Type   | Description                           |
| -------------------------------------------- | ------ | ------------------------------------- |
| exchange<mark style="color:red;">\*</mark>   | string | Decentralized exchange Id             |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain for decentralized exchange |

#### Query Parameters

| Name                                     | Type    | Description                                                                                                                 |
| ---------------------------------------- | ------- | --------------------------------------------------------------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark> | string  | Your Abyiss API Key                                                                                                         |
| limit                                    | int     | Number of results per request. Maximum 1,0000 (defualt 100)                                                                 |
| orderBy                                  | string  | Sort the returned data by any field in the API response, such as `id`, `name`, `symbol`, `volumeUSD` and more.              |
| orderDirection                           | string  | `asc` or `desc` return the results sorted by that field in either ascending or descending order.                            |
| skip                                     | int     | Number of results to skip per request.                                                                                      |
| tokenSymbol                              | string  | Filters the results to show only records with the specified token symbol. Example: `WETH`                                   |
| tokenId                                  | string  | Filters the results to show only records with the specified token ID. Example: `0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2` |
| tokeName                                 | string  | Filters the results to show only records with the specified token name. Example: `Wrapped Ethereum`                         |
| logo                                     | boolean | Determines whether or not to include the logo in the response. Example: `true` or `false`                                   |

{% tabs %}
{% tab title="200: OK Success" %}

```json
[
    {
        "id": "0x00000000000045166c45af0fc6e4cf31d9e14b9a",
        "name": "TopBidder",
        "symbol": "BID",
        "decimals": "18",
        "supply": "28240",
        "totalValueLocked": "45.690660599764812617",
        "totalValueLockedUSD": "0",
        "volume": "8347.641875381858852443",
        "volumeUSD": "8114.480070327402387046118602321907",
        "untrackedVolumeUSD": "4057.240035163701193523059301160956",
        "txCount": "15",
        "derivedETH": "0",
        "feesUSD": "81.14480070327402387046118602321907",
        "totalValueLockedUSDUntracked": "0",
        "poolCount": "0"
    }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Example URLs:&#x20;

* <https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?apiKey=>
* <https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?tokenSymbol=WETH&logo=true&apiKey=>
* <https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?tokenId=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&logo=true&apiKey=>
* <https://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?tokenName=Ethereum&logo=true&apiKey=>
* <http://api.abyiss.com/v2/dex/uniswap/ethereum/tokens?tokenSymbol=WETH&tokenId=0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2&logo=true&tokenName=EthereumNameService&apiKey=>

### **Response Object**

```json
[
    {
        "id": "0x95ad61b0a150d79219dcf64e1e6cc01f0b64c4ce",
        "name": "SHIBA INU",
        "symbol": "SHIB",
        "decimals": "18",
        "supply": "18240",
        "totalValueLocked": "1006152663747.818392476644062536",
        "totalValueLockedUSD": "9989860.304795510277702975232615195",
        "volume": "266698446900978.998654557602976886",
        "volumeUSD": "3901300011.472526871991542874821034",
        "untrackedVolumeUSD": "3942142264.394503491291958788380872",
        "txCount": "629286",
        "derivedETH": "0.000000005224360344368931294971240286955516",
        "feesUSD": "23415626.21105531686238648984594351",
        "totalValueLockedUSDUntracked": "0",
        "poolCount": "0",
        "logo": "https://raw.githubusercontent.com/abyiss/assets/master/blockchains/ethereum/assets/0x95aD61b0a150d79219dCF64E1E6Cc01f0B64C4cE/logo.png"
    }
]
```

### Response Attributes

<table><thead><tr><th width="265.3333333333333">Attribute Name</th><th>Data Type</th><th>Description </th></tr></thead><tbody><tr><td>id</td><td>string</td><td>Token contact address</td></tr><tr><td>name</td><td>string</td><td>Token name</td></tr><tr><td>symbol</td><td>string</td><td>Token symbol</td></tr><tr><td>tokenDecimals</td><td>string</td><td>Token decimals</td></tr><tr><td>totalSupply</td><td>string</td><td>Token total supply</td></tr><tr><td>tokenTotalValueLocked</td><td>string</td><td>Liquidity across all pools in token units</td></tr><tr><td>tokenTotalValueLockedUSD</td><td>string</td><td>Liquidity across all pools in derived USD</td></tr><tr><td>tokenVolume</td><td>string</td><td>Volume in token units</td></tr><tr><td>tokenVolumeUSD</td><td>string</td><td>Volume in derived USD</td></tr><tr><td>tokenUntrackedVolumeUSD</td><td>string</td><td>Volume in USD even on pools with less reliable USD values</td></tr><tr><td>tokenTxCount</td><td>string</td><td>Transactions across all pools that include this token</td></tr><tr><td>tokenDerivedETH</td><td>string</td><td>Derived price in ETH</td></tr><tr><td>tokenFeesUSD</td><td>string</td><td>Fees in USD</td></tr><tr><td>totalValueLockedUSDUntracked</td><td>string</td><td>TVL derived in USD untracked</td></tr><tr><td>poolCount</td><td>string</td><td>Number of pools containing this token</td></tr><tr><td>logo</td><td>string</td><td>Token Logo URL</td></tr></tbody></table>


# WebSockets

Decentralized exchange real-time Websockets connections.

{% hint style="warning" %}
**Request access by emailing** [**support@abyiss.com**](mailto:support@abyiss.com)**.**
{% endhint %}

Real-time WebSocket data and connections to decentralized cryptocurrency exchanges.&#x20;

Currently in early alpha. Initial usage will be rolled out one exchange at a time. Contact our support team or email us at [support@abyiss.com](<mailto:support@abyiss.com >) to request access.


# Request Access

Request access by emailing support\@abyiss.com.

{% hint style="warning" %}
**Request access by emailing** [**support@abyiss.com**](mailto:support@abyiss.com)**.**
{% endhint %}

Real-time WebSocket data and connections to decentralized cryptocurrency exchanges.&#x20;

Currently in early alpha. Initial usage will be rolled out one exchange at a time. Contact our support team or email us at [support@abyiss.com](<mailto:support@abyiss.com >) to request access.


# Request Access

Closed Alpha - Real-time Crypto Alerts APIs

{% hint style="warning" %}
**Request access by emailing** [**support@abyiss.com**](mailto:support@abyiss.com)**.**
{% endhint %}

## Request Access

To access our Crypto Alert APIs, please send an email to <support@abyiss.com> requesting access. Our support team will assist you with the onboarding process.

## Closed Alpha

We are currently in a closed alpha phase. During this stage, access to the platform is limited. However, you can request access by reaching out to our support team or emailing us at <support@abyiss.com>. We appreciate your interest and will do our best to accommodate your request.

## Real-time Crypto Alerts

Our platform provides real-time crypto alerts for Bitcoin, Ethereum, and over 100,000+ other cryptocurrencies. Stay ahead of the game with email and SMS alerts on more than 100+ exchanges. Our alerts cover a wide range of information, including token prices, liquidity pools, trading volumes, whale activities, and much more.

## Support for Centralized and Decentralized Exchanges

We support both centralized and decentralized exchanges, ensuring that you have comprehensive coverage across various trading platforms. Whether you trade on popular centralized exchanges or participate in decentralized finance (DeFi) on platforms like Ethereum, our alerts can keep you informed.<br>


# Changelog

Release details and dates for Abyiss API changes.

## Release Version 2.2.4 - 7/12/23

We are delighted to announce the latest milestone in our continual efforts to provide a more robust, efficient and user-friendly experience for our customers - the upgrade to our /v2 API.

Here's what this update entails:

* /v2 API Upgrade: As part of our ongoing commitment to keep Abyiss at the forefront of technology and user experience, we've now upgraded all of our /v1 API endpoints to /v2. This move is aimed to equip developers with a more powerful and streamlined platform that delivers faster responses, improved performance, and offers advanced features.
* Seamless Transition: To minimize disruptions to your applications, the upgrade process has been designed to be smooth and seamless. You'll find that all your familiar endpoints now have an equivalent in /v2, with identical functionality but enhanced performance and capability.
* Backward Compatibility: We understand the importance of backward compatibility and have ensured that your existing applications working with our /v1 APIs will continue to function properly as you transition to /v2. However, we encourage all users to migrate their applications to take advantage of the enhancements that /v2 offers.
* Enhanced Error Handling: As part of the /v2 upgrade, we've significantly improved our error handling capabilities. You'll now receive more accurate and detailed error responses, which will help you debug issues more efficiently.
* Documentation Update: Our documentation has been revised to reflect these changes, and now includes a comprehensive guide on transitioning from /v1 to /v2. We recommend that all developers review the updated documentation to familiarize themselves with the new endpoints and features.

We are confident that this upgrade will provide developers with a more dynamic and efficient way to build applications on Abyiss. We encourage your feedback and suggestions on the new /v2 APIs and remain committed to serving your needs. As always, thank you for your continued support and trust in our platform.

## Release Version 2.2.3 - 3/22/23

We are excited to announce the release of our newest APIs that will allow developers to integrate with Abyiss.&#x20;

Here are the latest changes and updates we made:

* New DEX APIs: We have added a set of new APIs to our platform that enables developers to interact with decentralized exchanges like Uniswap. With these APIs, developers can access various functionalities, including real-time and historical token data, checking liquidity pool status, getting trading history, and more.
* Improved functionality: Our development team has worked hard to improve the overall functionality of our platform. We have made several enhancements to the existing APIs, including better error handling and more detailed response messages.
* Bug fixes: We have resolved various issues reported by our users, including bugs related to incorrect data representation and inconsistent response times.

We believe that the latest changes will provide developers with a more robust and reliable way to build applications on top of Abyiss. If you have any feedback or suggestions, please feel free to contact us. We appreciate your continued support and trust in our platform.

## Release Version 2.1.0 - 10/18/22

We are thrilled to announce the release of our latest APIs that will enable developers to access two new endpoints: the whales endpoint and the liquidity endpoint.

Here are the newest changes and updates we made:

* Whales Endpoint: We have added a new API endpoint that allows users to track large transactions on centralized exchanges. With this endpoint, developers can access data on large trades, helping them identify trends in the market and make more informed trading decisions.
* Liquidity Endpoint: We have also added a new API endpoint that enables users to track market liquidity on centralized exchanges. This endpoint provides developers with detailed information on the order books, trade volumes, and liquidity of specific markets.
* Improved functionality: Our development team has made various improvements to the existing APIs, including better error handling and more detailed response messages. These changes will provide users with a more robust and reliable way to access and interpret exchange data.

We believe that the latest changes will help developers build more sophisticated trading tools and gain deeper insights into the market. If you have any feedback or suggestions, please feel free to contact us. We appreciate your continued support and trust in our platform.<br>


# Upcoming Changes

Release details and dates for upcoming Abyiss API changes.

We are excited to share some major updates that we plan to roll out in the coming weeks. Here's a sneak peek at what's in store:

* **WebSockets**: We are working on adding WebSockets support to our APIs. This will enable real-time data streaming and push notifications, providing users with a more seamless and efficient trading experience.
* **Notifications**: We are also developing a notification system that will allow users to receive alerts on important market events and changes in their accounts.
* **More Reference Data Endpoints**: We plan to expand our reference data endpoints to include more comprehensive data on trading pairs, exchanges, and assets.
* **More Market Data Endpoints**: Additionally, we are adding more market data endpoints to provide users with access to real-time and historical data on trading volumes, price movements, and more.
* **On-Chain Data**: We will be introducing new endpoints that allow developers to access and analyze on-chain data, providing deeper insights into blockchain networks and decentralized applications.
  * **Wallet Data & Tracking**: We are developing new APIs that will enable users to track wallet balances and transactions across multiple blockchains.
  * **Money In-Flows & Out-Flows**: Our platform will soon provide data on money flows into and out of exchanges and wallets, helping traders and investors to better understand market sentiment.
  * **Support for Multiple Cryptocurrencies**: We are expanding our platform to include support for Bitcoin, Ethereum, Stable Coins, Binance Coin (BNB), Solana, and more.

We are committed to continuously improving and expanding our APIs to meet the evolving needs of our users. Stay tuned for more updates in the coming weeks!


# Glossary

Coming Soon

{% hint style="warning" %}
**Coming Soon**
{% endhint %}


# Social Media

Connect with Abyiss on social media!

## Connect with Us

Stay up-to-date with our latest news and updates by following us on social media. We post regular updates on the following platforms:

* [Twitter](https://twitter.com/abyissx)
* [LinkedIn](https://www.linkedin.com/company/abyiss/)
* [YouTube](https://www.youtube.com/@abyiss)
* [Reddit](https://www.reddit.com/r/abyiss/)
* [GitHub](https://github.com/Abyiss)
* [Instagram](https://www.instagram.com/abyiss.us/)
* [Facebook](https://www.facebook.com/AbyissFB)

Have a question or need support? Here are a few ways to get in touch:

* [Website](https://abyiss.com/contact)
* [Email: support@abyiss.com](mailto:support@abyiss.com)
* [Discord](https://discord.com/invite/AUCaZaXXg2)
* [Telegram](https://t.me/+NNu6vexDgc00MDUx)

We value your feedback and are always looking for ways to improve our platform. Don't hesitate to reach out to us with any questions, comments, or concerns.


# Legal Guide

The information below is not legal advice. This is general legal information intended as a resource.

{% hint style="info" %}
**The information provided in this document is based on the guidance provided by** [**0x** ](https://www.0x.org/)**in their** [**0x Legal Guide**](https://docs.0x.org/developer-resources/0x-legal-guide)**.**
{% endhint %}

## Introduction

Due to the diverse nature of projects that can be built in crypto, there are no uniform legal standards applicable to all projects. However, there are certain legal regimes that are more likely to impact such projects. This document surveys some of the relevant laws and regulations that developers should be aware of and potentially seek qualified and individualized legal advice on to ensure compliance.&#x20;

*The information below is not legal advice. This is general legal information intended as a resource for the ecosystem. To understand how this information may impact your project specifically, hire a good lawyer.*&#x20;

How all of the laws intersect with the exchange of digital assets is still an evolving issue and demands careful consideration. For additional resources, check out the Legal Library below that contains links to important cases, statements from regulators, and other legal commentary specific to the digital asset industry.

## United States

### Federal Securities Regulation

The United States has a set of intricate laws and regulations that apply to activities involving financial instruments that meet the legal definition of a security. These laws cover a wide range of topics, such as the rules around selling securities, who can own specific types of securities, and the required disclosures for securities investors. Due to the complexity of these laws, it's crucial to determine which transactions involving crypto assets fall under the category of securities. Answering this question is a critical first step for anyone working with crypto assets in the US.

#### What is a Security

So what is a security? Unfortunately, as even [federal courts have recognized](https://scholar.google.com/scholar_case?case=10900624885862830401\&q=gary+plastic\&hl=en\&as_sdt=6,47#p238), the definition of a security is "broad and ambiguous." Consequently, it is difficult to layout a bright line rule by which a security can easily be distinguished from a non-security. Instead, [courts have designed a flexible test](https://scholar.google.com/scholar_case?case=12975052269830471754) that is intended to "to meet the countless and variable schemes devised by those who seek the use of money of others on the promise of profits."

In particular, the U.S. Supreme Court has outlined a four-part test for determining whether a transaction qualifies as a form of a security called an “investment contract." Originally set forth in [SEC v. W.J. Howey Co.](https://scholar.google.com/scholar_case?case=12975052269830471754\&q=sec+v+howey\&hl=en\&as_sdt=6,47#p298), the Court has explained that a transaction is an “investment contract” when it involves (1) an investment of money (2) in a common enterprise (3) with an expectation of profit (4) to be derived from the efforts of others.

There is a long history of cases interpreting whether various financial instruments meet this definition of a security, covering everything from [bank certificates of deposits](https://scholar.google.com/scholar_case?case=10900624885862830401) to interests in [whiskey barrels](https://scholar.google.com/scholar_case?case=14457626249500273939). Some of the most influential cases have been compiled [here](broken://pages/pimRvs0Lrr40lrEtL5w9). However, there are many more cases analyzing various elements of the Howey test, each hinging on the specific facts of the particular transaction.

As proof of the inherent difficulty in defining a clear border between what is and is not a security, there have been numerous instances of courts applying the Howey test to seemingly similar transactions and coming to different results. For example, there are several cases holding certain [real estate leases](https://scholar.google.com/scholar_case?case=4030348895733612487) to be securities when offered in a particular manner. Likewise, there are numerous cases addressing when the sale of a tangible product like [the sale of beavers](https://scholar.google.com/scholar_case?case=8958675023427121133) may be offered as part of a securities transaction. These cases demonstrate that courts place less of a premium on the nature of the underlying product being sold and more on the manner in which it was sold.

#### Application to the crypto asset industry

It is important to understand that the primary way the law develops in the U.S. is through the application of existing legal precedent by courts to cases that present new fact patterns not previously contemplated. As of early 2019, very few U.S. courts have wrestled with how to apply the Howey test to crypto asset transactions, so it is still unclear how certain lines will be drawn to delineate securities from non-securities. There are a handful of cases pending in front of courts that may result in decisions that directly address this issue, and inevitably there will be future cases so long as certain teams use the sale of crypto assets as a way to promise future profits to third parties. For now, though, most agree that there is a lack of clarity for developers building projects in this industry.

Moreover, there is significant confusion even among lawyers as to how Howey should apply in the context of secondary market transactions in which the original token issuer is not directly involved. Even if an initial sale of a token had some of the hallmarks of a securities offering, it is unclear whether a subsequent transaction by a token holder to, for example, trade the token for a cryptokitty is somehow also a securities transaction. This confusion stems in part from the fact that virtually every historical case applying Howey deals with a transaction in which a promoter is promising some form of financial return to the counterparty.

In the context of this unclear regulatory environment, creators are left to make good faith attempts at trying to comply with the securities law. Some helpful factors to consider include:

* How was the initial token sale or distribution conducted, including what did the development team represent to prospective tokens purchasers?
* How is the token designed to operate within the network being created, including whether the design is meant to confer specific financial returns to the token holder or instead be used in some consumptive manner?
* What is the current status of development on the underlying network or project, and is their interest and involvement from those other than the team that issued the tokens?

This suggested framework is not meant to be comprehensive, and depending on the nature of the project being developed, it may be helpful to work directly with lawyers to design a process that provides adequate protection.

#### The SEC's current position

The Securities and Exchange Commission (SEC), the primary regulator of the securities market in the US, has been active in voicing its opinion about certain activities in the crypto asset industry. The SEC's first major foray in the industry came in July 2017 in the form of [a report](https://www.sec.gov/litigation/investreport/34-81207.pdf) stating that sale of tokens by "The DAO" constituted the sale of securities. The SEC has since reached settlements with several industry participants and also issued several statements about when certain activity within the industry may be subject to securities regulations. A complete listing of those documents can be found [here](broken://pages/pimRvs0Lrr40lrEtL5w9). Notably, some members of the SEC have said that they believe that the vast majority of tokens sold as part of a fundraising effort (so called "ICOs") were securities offerings.

In March 2019, the SEC's Strategic Hub for Innovation and Financial Technology (aka FinHub) issued a framework intended to help those within the crypto asset industry evaluate which assets may be viewed by the Staff of the SEC as securities. The [FinHub framework](https://www.sec.gov/corpfin/framework-investment-contract-analysis-digital-assets) identifies numerous factors to consider when analyzing whether the sale of a crypto asset meets the final two prongs of the Howey test, i.e., whether there is an expectation of profit based on the efforts of a third party. The framework places a strong emphasis on factors used to determine whether an "Active Participant" exists that provides "essential managerial efforts that effect the success of the enterprise, and investors reasonably expect to derive profits from those efforts."

Currently, one of the largest areas of debate relating to the SEC's position on the crypto asset industry is how it plans to apply securities law to the secondary market trading of tokens that may have initially been sold as part of a securities offering. The SEC's own Director of Corporate Finance has opined that "strictly speaking, the token – or coin or whatever the digital information packet is called – all by itself is not a security." Instead, the Director appropriately noted that "a careful and fact-sensitive legal analysis" of secondary market trading is necessary, focused on how the token is offered and sold, including the reasonable expectations of purchasers. The Director offered one standard for determining when a token is not a security based on whether the network upon which a token exists is "sufficiently decentralized." In a [speech proposing this standard](https://www.sec.gov/news/speech/speech-hinman-061418), the Director also laid out several factors that could be considered to determine whether a token is "sufficiently decentralized." The more-recent FinHub framework also addresses this issue but does not use the term "sufficiently decentralized." Instead, the framework lays out several factors to be analyzed around whether the value of the asset is still dependent on the efforts of the "Active Participants" and to what extent the underlying network technology is fully functional.

The primary takeaway from these statements is that the SEC has recognized that a crypto asset previously sold in a securities offering can later be sold on the secondary market in a non-securities transactions under certain circumstances. However, there are still many questions to be answered about the standard the SEC will use to distinguish between securities and non-securities transactions of crypto assets. Furthermore, despite advocating for a nuanced analysis of each token's network to make such a determination, the SEC has not actively engaged with this concept in the enforcement actions it has brought against certain industry participants. Instead, the SEC has issued orders in settled cases involving secondary market participants in which it has alleged without further explanation that the tokens themselves are the securities. Therefore, it is unclear exactly what analysis is currently actually being applied as it relates to secondary market transactions of crypto assets.

There has been significant debate about the SEC's general position relative to the crypto asset industry. Many have called on the SEC to provide greater clarity to the industry and to avoid regulating by enforcement. Most notably, for the first time ever, a crypto project in the SEC's crosshairs has decided not to settle and instead litigate against the SEC in court. The SEC filed [a complaint in federal court](https://www.sec.gov/litigation/complaints/2019/comp-pr2019-87.pdf) that alleges that Kik Interactive conducted an unregistered securities offering when it sold Kin tokens for approximately $100 million dollars in other assets. [Kik's submission to the SEC](http://kinecosystem.org/wells_response.pdf) arguing that it should not be sued was released to the public, and together these two documents present the stark difference in opinion that some within in the industry have aboue the SEC's current approach to crypto assets.

The Kik case will play out in court and could potentially result in judicial decisions that provide further clarity as to how securities law will apply. However, there have also been [efforts](https://coincenter.org/entry/principles-for-clarifying-sec-jurisdiction-over-cryptocurrencies-and-icos) outside the judicial realm, and even [some early legislative bills](https://www.cnbc.com/2018/12/20/lawmakers-look-to-change-secs-72-year-old-securities-definition-to-exclude-cryptocurrencies.html) in Congress, calling for the creation of standards defining the line between securities and non-securities more clearly.

*Important sidenote: All statements from the SEC, such as the speeches cited in this section as well as all SEC orders that result from settlements with alleged wrongdoers, do not constitute binding law and should generally be interpreted as merely reflecting the position of the SEC. To what extent courts applying the law will agree or disagree with the SEC's positions remains to be seen.*

#### What is an Exchange?

Most of the securities law discussion in the industry to date has focused on the threshold question of what is a security. This makes sense because there is no need to look at other aspects of the securities laws if a transaction does not involve a security. But so long as the question of which crypto assets may be securities remains unclear, it is also important to consider a few of these other areas of securities law.

One area of focus should be what constitutes a securities exchange. A securities exchange is defined as "any organization, association, or group of persons that: (1) brings together the orders of multiple buyers and sellers; and (2) uses established non-discretionary methods (whether by providing a trading facility or by setting rules) under which such orders interact with each other, and the buyers and sellers entering such orders agree to the terms of the trade." Any platform meeting the definition of a securities exchange generally must register with the SEC and follow a number of restrictive rules.

The [current rule adopted by the SEC](https://www.govinfo.gov/content/pkg/FR-1998-12-22/html/98-33299.htm) relating to exchanges was modernized in 1998 in response to market participants incorporating technology that the existing "regulatory framework, designed more than six decades ago, did not envision." Obviously, the pace of technological development has only increased since 1998, and some of the concepts set forth in the SEC's formal interpretation of the rule are difficult to apply, particularly to concepts presented by blockchain technologies.

In November 2018, the SEC [settled an action](https://www.sec.gov/litigation/admin/2018/34-84553.pdf) with the founder of a trading platform called EtherDelta on the basis that the platform was an unregistered securities exchange. In its settlement order, the SEC alleged that some of the 500 tokens listed on EtherDelta were securities although it did not identify which ones. The SEC then alleged that EtherDelta operated as an exchange because:

> "EtherDelta brought together orders by receiving and storing orders in tokens in the EtherDelta order book and displaying the top 500 orders (including token symbol, size, and price) as bids and offers on the EtherDelta website. EtherDelta provided the means for these orders to interact and execute through the combined use of the EtherDelta website, order book, and pre-programmed trading protocols defined in the EtherDelta smart contract. These established non-discretionary methods allowed Users to agree upon the terms of their trades in tokens on EtherDelta during the Relevant Period."

As explained above, settlement orders like this are not binding law. Moreover, every case is fact-dependent such that this order cannot answer how the SEC would view marketplaces where the various functions operate differently, are distributed among different parties, or where all tokens are not indiscriminately offered to users. However, this provides the first practical insight into which issues the SEC is focusing on when analyzing trading platforms and should be closely considered by any trading platform.

### Federal Commodities and Derivatives Regulation

When we think about commodities, historically this term has been used to refer to agriculture products like wheat, corn and sugar. However, U.S. law has evolved to define a commodity extremely broadly to also include "all services, rights, and interests . . . in which contracts for future delivery are presently or in the future dealt in.” As a result, almost anything (except [onions](https://en.wikipedia.org/wiki/Onion_Futures_Act)) can constitute a “commodity” under the definition.

The Commodities Futures Trading Commission (CFTC) is the primary regulator of "commodities interests". The [CFTC has taken the position](https://www.cftc.gov/sites/default/files/idc/groups/public/@lrenforcementactions/documents/legalpleading/enfcoinfliprorder09172015.pdf) that some virtual currencies like Bitcoin are commodities, and there have already been [court cases that agree](https://scholar.google.com/scholar_case?case=16464466787559233193) with this position. Based on the broad definition discussed above, it is possible that virtually every crypto asset can be legally defined as a commodity. From a practical perspective, it seems that the CFTC is taking a deliberate approach to the crypto asset industry, and is not actively extending its jurisdiction where, for example, the SEC may first want to identify an asset as a security. Moreover, it remains to be seen whether the CFTC will identify some limit to the definition of a commodity for assets like non-fungible tokens and crypto collectibles.

Commodities are regulated very differently than securities. Indeed, just because something is a commodity does not mean that it is subject to specific rules such as the requirements around securities governing who can purchase them, how they must be offered, etc. This is due to the fact that, historically, the spot market for trading commodities has been considerably smaller than the market for trading derivatives of commodities. Most people do not trade actual stalks of corn for cash. Instead, most people trade contracts based on the future price of corn (or other commodities) - i.e., futures contracts. However, with crypto assets, much of the exchange activity occurs in the spot market.

There are no laws directly regulating spot market transactions for commodities (i.e., transactions that involve the full payment of the purchase price and contemporaneous delivery of commodity at the time the transaction is entered by the parties). The CFTC has limited authority to police the spot markets for fraud and manipulation, but cannot adopt rules that directly control how spot market participants transact.

U.S. law does set forth detailed restrictions for a wide range of non-spot market transactions, including those involving commodities derivatives, future delivery or financing, leverage, or margin. As a result, the CFTC has been actively regulating nascent futures markets in commodities like Bitcoin. Additionally, the CFTC has been monitoring smart contract applications closely and [has put out statements](https://www.cftc.gov/sites/default/files/2018-11/LabCFTC_PrimerSmartContracts112718_0.pdf) explaining that certain actors must comply with applicable regulations when using smart contracts to facilitate regulated transactions in commodities interests, such as forwards, futures, options and swaps.

At a high level, a CFTC-regulated transaction can only be conducted over regulated exchanges, which include, depending on the type of transaction, Designated Contract Markets (“DCMs”) and Swap Execution Facilities (“SEFs”). Exceptions to this requirement may apply, but broadly speaking, these exceptions are only available to certain sophisticated market participants or high-net-worth individuals. In addition, the CFTC directly regulates the intermediaries that facilitate CFTC-regulated transactions, including introducing brokers, futures commission merchants, swap dealers, commodity pool operators, or commodity trading advisors. The application process to become a DCM, SEF, or regulated intermediary is costly and difficult, and regulated exchanges and intermediaries are subject to extensive ongoing regulatory oversight by the CFTC.

### OFAC Sanctions

The U.S. Department of Treasury's Office of Foreign Assets Control (OFAC) maintains a list of people that U.S. persons are not permitted to transact with in any manner. The list can generally be broken down into two categories: 1) People from specific [embargoed countries and geogpraphic areas](https://www.treasury.gov/resource-center/sanctions/Programs/Pages/Programs.aspx) such as Iran, North Korea, and Syria; and 2) people on the [Specially Designated Nationals (SDN) list](https://www.treasury.gov/resource-center/sanctions/SDN-List/Pages/default.aspx), which is comprised of select individuals responsible for particularly bad behavior like human trafficking or government corruption.

Unlike most other U.S. financial laws that establish process-based rules that must be followed, OFAC sanctions simply prohibits certain activity - i.e., doing business with people on the sanctions list. Relatedly, sanctions laws impose strict liability, meaning there is no legal defense for someone who tried to do the right thing. That being said, historically, the consequences for those who purposefully evade or ignore sanctions laws are much more severe than for those who attempt to avoid transacting with a sanctioned person. Indeed, consequences can be as severe as criminal prosecution and jail time.

In practice, most companies implement risk-based processes custom tailored to their business in order to avoid sanctions violations. The convenience store in Michigan faces virtually no risk of conducting significant business with sanctioned individuals and thus likely does not need a "know your customer" (KYC) program. On the other hand, a U.S. affiliated bank operating in countries that rank high in corruption will likely need to be able to conduct thorough background checks on customers to ensure compliance.

OFAC sanctions is one of the legal regimes that does not suffer from a significant lack of clarity when applied to most crypto asset projects. For any U.S. person operating such a project, they are potentially liable if a sanctioned individual uses their service. For more information, OFAC has included some [frequently asked questions about virtual currencies on its website](https://www.treasury.gov/resource-center/faqs/Sanctions/Pages/faq_compliance.aspx#vc_faqs). Notably, OFAC states that it may identify certain virtual currency wallet addresses belonging to individuals on the SDN list so that U.S. persons can block transactions with that address. The first instance of this practice occured in November 2018, 2h3n OFAC [identified](https://home.treasury.gov/news/press-releases/sm556) bitcoin wallet addresses belonging to two individuals added to the SDN list.

The extent of the risk of exposure to sanctioned individuals and countries can vary widely based on the specific project, and may be influenced by such variables as the type of assets being offered, the volume of transactions being facilitated, the areas in which the service is available. Ultimately, there is no one-size-fits-all to OFAC sanctions compliance but it is an issue that each project should consider.

### Federal Anti-Money Laundering Regulation

U.S. law requires certain intermediaries in the financial system to assist in detecting and preventing money laundering activity and terrorist financing. Specifically, the Bank Secrecy Act (BSA) requires certain “financial institutions” to assist the U.S. government by, for example, implementing risk-based anti-money laundering (AML) programs and filing reports with the government when suspicious transactions are identified by those programs.

The types of financial institutions covered by the BSA range broadly and include everything from banks to casinos. Importantly, for developers working with crypto assets, the BSA applies to “money services businesses,” a category that is further subdivided to include “money transmitters.” The Financial Crimes Enforcement Network (FinCEN), which is the primary federal regulator responsible for enforcing the BSA, has interpreted certain businesses involved in crypto assets to fall under the definition of money transmitters such that they must comply with the BSA.

So what is a money transmitter? A money transmitter is defined as anyone involved as a business in “the acceptance of currency, funds, or other value that substitutes for currency from one person and the transmission . . .to another location or person by any means.” When adopting this language, FinCEN confirmed that the reference to “other value that substitutes for currency” was intended to capture informal value systems that do not involve the transfer of fiat currency. The BSA regulations make the determination of whether someone is a money transmitter explicitly based on the specific “facts and circumstances,” which is a signal in the legal world that the definition is meant to be broad and flexible.

In 2013, FinCEN [issued guidance](https://www.fincen.gov/sites/default/files/shared/FIN-2013-G001.pdf) directed in part at the crypto asset industry delineating when FinCEN considered certain crypto businesses to be money transmitters. Specifically, FinCEN differentiated between three categories of people involved with so-called "convertible virtual currencies". As a preliminary matter, FinCEN defines convertible virtual currency as a "medium of exchange" that "either has an equivalent value in real currency, or acts as a substitute for real currency."

It should be evident from this broad definition that most of the current tokens widely available on the market likely meet this definition, particularly most ERC-20 tokens. However, we can also look to the other end of the spectrum and see how a non-fungible token in the form of a cryptocollectible may not meet this definition as it is hard to imagine how we could use something like cryptokitties as a medium of exchange despite each potentially having some discoverable value in fiat.

Where the line is between what is and is not a convertible virtual currency is not well defined yet. There have only been a few court cases addressing which tokens meet the definition of a convertible virtual currency. A handful of cases have confirmed that bitcoin is a convertible virtual currency. Separately, Ripple settled a case brought by the government that was premised on XRP being a convertible virtual currency. But with respect to the ever-increasing number of tokens available on the market, the only source of guidance is the language of the definition and statements by FinCEN that indicate that they interpret the term broadly to cover many tokens.

For now, let's assume we are dealing with a token that meets the definition of a convertible virtual currency. The guidance describes certain activities involving convertible virtual currencies that constitute money transmission. Specifically, FinCEN created the following categories:

* User - A user is defined as someone who obtains convertible virtual currency in order to purchase goods or services. In subsequent statements from FinCEN, this definition has been broadened somewhat to include someone who purchases convertible virtual currency as investment for his or her own account.
* Exchanger - An exchanger is defined as someone engaged in the business of exchanging virtual currency for real currency, funds, or another virtual currency by either 1) accepting and transmitting a convertible virtual currency or 2) buying and selling a convertible virtual currency for any reason.
* Administrator - An administrator is defined as someone engaged as a business in issuing (putting into circulation) a virtual currency, and who has the authority to redeem (to withdraw from circulation) such virtual currency. As most crypto assets are issued without an ability to mandate redemption, this definition is generally not that relevant for our purposes.

Since issuing its initial guidance in 2013, FinCEN has clarified these definitions in subsequent "Administrative Rulings." In [one of these administrative rulings](https://www.fincen.gov/sites/default/files/shared/FIN-2014-R001.pdf), FinCEN clarified that a person who exchanges virtual currency for their own account as not as a business service to third parties is considered a user and not an exchanger. In [another ruling](https://www.fincen.gov/sites/default/files/shared/FIN-2014-R002.pdf), FinCEN stated "\[t]he production and distribution of software, in and of itself, does not constitute acceptance and transmission of value, even if the purpose of the software is to facilitate the sale of virtual currency. "

There is a strong argument that the definition of exchanger does not apply to someone who does not take custody of another person's virtual currency. As explained thoughtfully in [this report](https://coincenter.org/files/2017-05/report-bsa-crypto-token1.pdf) from Coin Center:

*"A non-custodial exchange is probably not an exchanger or a money transmitter. If, like Craigslist or any other online classified advertising service, the business merely helps individual buyers and sellers find and communicate with each other, then it is never “accepting and transmitting” tokens or bitcoins for its users, nor is it “buying or selling” tokens or bitcoins. It may be commonly understood as an exchange because it deals in exchange-related information (e.g. order-books, offers, acceptances, communications between buyers and sellers) but it, as a company, is never doing the actual currency conversion or handling the actual tokens or money; that all happens peer-to-peer. Another way to characterize what these companies do is: development of a web-based software tool (e.g. a website) that facilitates peer-to-peer exchange. As we discussed earlier, FinCEN’s Software and Investment Ruling describes mere software development and distribution as outside the scope of BSA regulation."*

The facts and circumstances of any particular project may impact this analysis. As with this entire primer, the above is just intended as a legal resource and for actual legal advice on any particular project or situation, you should hire a lawyer.

## Legal Library

### Federal Securities Regulation

#### Key Cases

*Regarding Crypto Assets*

* [SEC v. Blockvest, LLC](https://www.sec.gov/litigation/litreleases/2019/order24400.pdf) (S.D. Cal. 2019)

*Important Howey Test Cases*

* [SEC v. C.M. Joiner Leasing Corp.](https://scholar.google.com/scholar_case?case=11822356269281048781), 320 U.S. 344 (1943)
* [SEC v. W.J. Howey Co.](https://scholar.google.com/scholar_case?case=12975052269830471754), 328 U.S. 293 (1946)
* [Tcherepnin v. Knight](https://scholar.google.com/scholar_case?case=5481496770318090573), 389 U.S. 332 (1967)
* [United Housing Foundation, Inc. v. Forman](https://scholar.google.com/scholar_case?case=11168754825085710379), 421 U.S. 837 (1975)
* [Glen-Arden Commodities, Inc. v. Costantino](https://scholar.google.com/scholar_case?case=14457626249500273939), 493 F.2d 1027 (2d Cir. 1974)
* [Gary Plastic Packaging Corp. v. Merrill Lynch](https://scholar.google.com/scholar_case?case=10900624885862830401), 756 F.2d 230 (2d Cir. 1985)

#### SEC Statements & Settlement Orders

* [Framework for Investment Contract Analysis of Digital Assets](https://www.sec.gov/corpfin/framework-investment-contract-analysis-digital-assets)
  * Proposed framework from SEC's FinHub as to how to analyze whether the sale or offering of a digital asset constitutes a security in the form of an investment contract.
* [SEC Settlement Order re: Gladius Network LLC](https://www.sec.gov/litigation/admin/2019/33-10608.pdf) (Feb. 20, 2019)
  * Settlement for unregistered securities offering resulting in no penalty due to self disclosure and cooperation.
* [Speech by Commissioner Hester Peirce: Regulation: A View from Inside the Machine](https://www.sec.gov/news/speech/peirce-regulation-view-inside-machine) (Feb. 8, 2019)
* [Statement on Digital Asset Securities Issuance and Trading](https://www.sec.gov/news/public-statement/digital-asset-securites-issuuance-and-trading) (Nov. 16, 2018)
  * Statement from multiple SEC divisions highlighting recent enforcement actions and providing some guidance on the SEC's interpretation about the intersection of securities law and token offerings and trading.
* [SEC Settlement Order re: AirFox](https://www.sec.gov/litigation/admin/2018/33-10575.pdf) (Nov. 16, 2018)
  * Settlement based on allegations that AirFox token sale constituted an unregistered securities offering and that AirFox tokens are securities.
* [SEC Settlement Order re: Paragon](https://www.sec.gov/litigation/admin/2018/33-10574.pdf) (Nov. 16, 2018)
  * Settlement based on allegations that Paragon token sale constituted an unregistered securities offering and that PRG tokens are securities.
* [SEC Settlement Order re: Zachary Coburn](https://www.sec.gov/litigation/admin/2018/34-84553.pdf) (Nov. 8, 2018)
  * Settlement based on allegation that EtherDelta operated as a securities exchange without proper registration.
* [SEC Settlement Order re: TokenLot](https://www.sec.gov/litigation/admin/2018/33-10543.pdf) (Sept. 11, 2018)
  * Settlement based on allegations that TokenLot operated as an unregistered broker-dealer by soliciting investors to participate in ICOs and facilitating secondary market trading of tokens that were securities.
* [Digital Asset Transactions: When Howey Met Gary (Plastic)](https://www.sec.gov/news/speech/speech-hinman-061418): William Hinman - SEC Director of Division of Corporate Finance (June 14, 2018)
  * Speech by SEC official opining that ETH in its current form is not a security and laying out factors fow when a sufficiently decentralized digital asset may not be a security.
* [Statement on Potentially Unlawful Online Platforms for Trading Digital Assets](https://www.sec.gov/news/public-statement/enforcement-tm-statement-potentially-unlawful-online-platforms-trading) (Mar. 7, 2018)
  * Statement from multiple SEC divisions regarding regulatory issues and consumer risks related to trading tokens on exchanges, particularly tokens that meet the definition of a security.
* [SEC Settlement Order re: Munchee](https://www.sec.gov/litigation/admin/2017/33-10445.pdf) (Dec. 11, 2017)
  * Settlement based on allegation that MUN token sale constituted sale of unregistered securities.
* [Statement on Cryptocurrencies and Initial Coin Offerings](https://www.sec.gov/news/public-statement/statement-clayton-2017-12-11) (Dec. 11, 2017)
  * Statement from SEC Chairman directed at investors and industry participants regarding potential regulatory issues with ICOs.
* [Report of Investigation Pursuant to Section 21(a) of the Securities Exchange Act of 1934: The DAO](https://www.sec.gov/litigation/investreport/34-81207.pdf) (July 25, 2017)
  * Report alleging that DAO token sale constituted sale of unregistered securities and that DAO tokens were securities.
* Other SEC resources:
  * [Initial Coin Offerings](https://www.sec.gov/spotlight-initial-coin-offerings-and-digital-assets) resource page
  * [Index of statements](https://www.sec.gov/spotlight-initial-coin-offerings-and-digital-assets) re ICOs and digital assets
  * [SEC FinHub](https://www.sec.gov/finhub) landing page

#### Commentary & Analysis

* [Electronic Frontier Foundation letter to the SEC re: EtherDelta settlement](https://www.eff.org/files/2019/02/12/correspondence_from_eff_re_in_the_matter_of_zachary_coburn_file_no._3-18888-2.pdf) (Feb. 12, 2019)
* [Submission by Kik Interactive Inc. to the SEC](http://kinecosystem.org/wells_response.pdf) (Dec. 10, 2018)
* [What Are Token Securities? Some Questions from the Perplexed](https://corpgov.law.harvard.edu/2018/12/20/when-are-tokens-securities-some-questions-from-the-perplexed/) by James J. Park - UCLA School of Law (Dec. 20, 2018)
* [What can the EtherDelta settlement tell us about how decentralized exchanges are regulated?](https://coincenter.org/entry/what-can-the-etherdelta-settlement-tell-us-about-how-decentralized-exchanges-are-regulated) by Peter Van Valkenburgh - Coin Center (Nov. 8, 2018)
* [Securities Law & Crypto - Unqualified Opinions #14](https://messari.substack.com/p/securities-law-and-crypto-unqualified) by Katherine Wu - Messari (Oct. 11, 2018)
* [Securities Regulations and Initial Coin Offerings: A Legal Primer](https://fas.org/sgp/crs/misc/R45301.pdf) by Jay B. Sykes - Congressional Research Service (Aug. 31, 2018)
* [Framework for Securities Regulation of Cryptocurrencies (v2)](https://coincenter.org/files/securities-cryptocurrency-framework-v2.1.pdf) by Peter Van Valkenburgh - Coin Center (Aug. 10, 2018)
* [Principles for Clarifying SEC Jurisdiction over Cryptocurrencies and ICOs](https://coincenter.org/entry/principles-for-clarifying-sec-jurisdiction-over-cryptocurrencies-and-icos) by Peter Van Valkenburgh - Coin Center (May 24, 2018)
* [Regulation of Token Sales](https://youtu.be/tz8t5OTc7R0) {video} - Coin Center (Oct. 24, 2017)

### Federal Commodities & Derivatives Regulation

#### Key Cases

* [CFTC v. My Big Coin Pay, Inc.](https://www.cftc.gov/sites/default/files/2018-10/enfmybigcoinpayincmemorandum092618_0.pdf) (D. Mass. 2018)
* [CFTC v. McDonnell](https://scholar.google.com/scholar_case?case=16464466787559233193), 287 F.Supp.3d 213 (E.D.N.Y. 2018)

#### CFTC Statements & Settlement Orders

* [How the CFTC can take a pro-innovation posture while maintaining orderly markets](https://coincenter.org/entry/how-the-cftc-can-take-a-pro-innovation-posture-while-maintaining-orderly-markets) - Article by Commissioner Brian Quintenz (Feb. 12, 2019)
* [Remarks of Commissioner Brian Quintenz at the 38th Annual GITEX Technology Week Conference](https://www.cftc.gov/PressRoom/SpeechesTestimony/opaquintenz16) regarding smart contract regulation (Oct. 16, 2018)
* Proposed Interpretation on Virtual Currency “Actual Delivery” in Retail Transactions
  * [CFTC announcement](https://www.cftc.gov/PressRoom/PressReleases/7664-17) (Dec. 15, 2017)
  * [Proposed interpretation](https://www.cftc.gov/sites/default/files/idc/groups/public/@lrfederalregister/documents/file/2017-27421a.pdf)
* [Primer on Smart Contracts](https://www.cftc.gov/sites/default/files/2018-11/LabCFTC_PrimerSmartContracts112718_0.pdf) (Nov. 27, 2018)
* [Backgrounder on Oversight of and Approach to Virtual Currency Markets](https://www.cftc.gov/sites/default/files/idc/groups/public/%40customerprotection/documents/file/backgrounder_virtualcurrency01.pdf) (Jan. 4, 2018)
* [Primer on Virtual Currencies](https://www.cftc.gov/sites/default/files/idc/groups/public/%40customerprotection/documents/file/labcftc_primercurrencies100417.pdf) (Oct. 17, 2017)
* [CFTC Settlement Order re: Bitfinex](https://www.cftc.gov/sites/default/files/idc/groups/public/@lrenforcementactions/documents/legalpleading/enfbfxnaorder060216.pdf) (June 2, 2016)
* [CFTC Settlement Order re: Coinflip](https://www.cftc.gov/sites/default/files/idc/groups/public/@lrenforcementactions/documents/legalpleading/enfcoinfliprorder09172015.pdf) (Sept. 17, 2015)

#### Commentary & Analysis

* Cryptocurrency Derivatives, Funds and Advisers: Key Considerations Under U.S. Commodity Laws by Andrew P. Cross - Perkins Coie (Four-Part Series: [1](https://www.derivativesandreporeport.com/2018/09/cryptocurrency-derivatives-funds-and-advisers-key-considerations-under-u-s-commodity-laws-part-1-cryptos-are-commodites-except-when-they-are-not/), [2](https://www.derivativesandreporeport.com/2018/09/cryptocurrency-derivatives-funds-and-advisers-key-considerations-under-u-s-commodity-laws-part-2-the-regulation-of-commodities-quite-substantial-even-if-not-substantive/), [3](https://www.derivativesandreporeport.com/2018/10/cryptocurrency-derivatives-funds-and-advisers-key-considerations-under-u-s-commodity-laws-part-3-why-commodity-interests-are-of-interest/), [4](https://www.derivativesandreporeport.com/2018/10/cryptocurrency-derivatives-funds-and-advisers-key-considerations-under-u-s-commodity-laws-part-4-about-the-interests-of-interest/))
* [Frequently Asked Questions on Virtual Currency and CFTC Jurisdiction](https://www.skadden.com/insights/publications/2017/11/faqs-on-virtual-currency-and-cftc-jurisdiction) by several attorneys at Skadden, Arps, Slate, Meagher & Flom LLP (Nov. 15, 2017)
* [Bitcoin and Virtual Currencies: Welcome to Your Regulators](https://www.bakermckenzie.com/en/-/media/files/people/kluchenek-matthew/ar_na_mkluchenek_bitcoinvirtualcurrency_2016.pdf) by Matthew Kluchenek - Baker & McKenzie LLP

### OFAC Sanctions

#### OFAC Statements

* [FAQ on Virtual Currencies](https://www.treasury.gov/resource-center/faqs/Sanctions/Pages/faq_compliance.aspx#vc_faqs)
* Addition of two Individuals to SDN List and identification of associated bitcoin public addresses
  * [Treasury Dept. PR Release](https://home.treasury.gov/news/press-releases/sm556) (Nov. 28, 2018)
  * [SDN Designation](https://www.treasury.gov/resource-center/sanctions/OFAC-Enforcement/Pages/20181128.aspx) (Nov. 28, 2018)

#### Commentary & Analysis

* [What is OFAC and how does it apply to Bitcoin?](https://coincenter.org/entry/what-is-ofac-and-how-does-it-apply-to-bitcoin) by Joshua Garcia (May 3, 2015)

### Federal Anti-Money Laundering Regulation

#### Key Cases

* DOJ and FinCEN actions against BTC-E
  * [FinCEN Assessment of Civil Money Penalty](https://www.fincen.gov/sites/default/files/enforcement_action/2017-07-26/Assessment%20for%20BTCeVinnik%20FINAL%20SignDate%2007.26.17.pdf) (July 26, 2017)
  * [Indictment of BTC-E and Alexander Vinnik](https://www.justice.gov/usao-ndca/press-release/file/984661/download) (Jan. 17, 2017)
* [US v. Murgio](https://scholar.google.com/scholar_case?case=14324236322418966686), 209 F.Supp.3d 698 (S.D.N.Y. 2016)
* DOJ and FinCEN settlements with Ripple Labs (May 5, 2015)
  * [DOJ Non-Prosecution Agreement and Statement of Facts](https://www.justice.gov/sites/default/files/opa/press-releases/attachments/2015/05/05/settlement_agreement.pdf)
  * [FinCEN Assessment of Civil Money Penalty](https://www.fincen.gov/sites/default/files/shared/Ripple_Assessment.pdf)
* [US v. Faiella](https://scholar.google.com/scholar_case?case=11943246728627907201), 39 F.Supp.3d 544 (S.D.N.Y. 2014)

#### Statements & Administrative Rulings

* [Application of FinCEN’s Regulations to Certain Business Models Involving Convertible Virtual Currencies](https://www.fincen.gov/sites/default/files/2019-05/FinCEN%20CVC%20Guidance%20FINAL.pdf) (May 9, 2019)
  * Comprehensive guidance from FinCEN on the application of the Bank Secrecy Act to various crypto asset business models, including those involved in decentralized exchange.
* [Prepared Remarks of FinCEN Director Kenneth A. Blanco](https://www.fincen.gov/news/speeches/prepared-remarks-fincen-director-kenneth-blanco-delivered-2018-chicago-kent-block) (Aug. 9, 2018)
  * Speech summarizing FinCEN's approach to virtual currency.
* [Department of Treasury Letter to Senator Ron Wyden](https://coincenter.org/files/2018-03/fincen-ico-letter-march-2018-coin-center.pdf) (Feb. 13, 2018)
* FinCEN Administrative Rulings
  * [Application of FinCEN’s Regulations to a Virtual Currency Trading Platform](https://www.fincen.gov/sites/default/files/administrative_ruling/FIN-2014-R011.pdf) (Oct. 29, 2014)
    * Traditional centralized exchange model involving matching buyers and sellers directly constitutes money transmission despite argument that the exchange does not sit in the middle of a transaction.
  * [Application of FinCEN’s Regulations to a Virtual Currency Payment System](https://www.fincen.gov/sites/default/files/administrative_ruling/FIN-2014-R012.pdf) (Oct. 27, 2014)
    * Company that exchanges virtual currency for fiat in order to facilitate payment for vendors interested in accepting virtual currency is a money transmitter.
  * [Application of Money Services Business regulations to the rental of computer systems for mining virtual currency](https://www.fincen.gov/sites/default/files/administrative_ruling/FIN-2014-R007.pdf) (Apr. 29, 2014)
    * Rental of computer system for third party to mine virtual currency does not constitute money transmission when all virtual currency goes directly to third party's wallet and no virtual currency is exchanged
  * [Application of FinCEN’s Regulations to Virtual Currency Software Development and Certain Investment Activity](https://www.fincen.gov/sites/default/files/shared/FIN-2014-R002.pdf) (Jan. 30, 2014)
    * (1) The production and distribution of software alone is not sufficient to constitute money transmission and (2) buying and selling virtual currencies solely for one's own account is not money transmission.
  * [Application of FinCEN’s Regulations to Virtual Currency Mining Operations](https://www.fincen.gov/sites/default/files/shared/FIN-2014-R001.pdf) (Jan. 30, 2014)
    * A bitcoin miner is not a money transmitter when converting bitcoin to fiat for its own purposes and not as a business service for the benefit of others.
* [Application of FinCEN's Regulations to Persons Administering, Exchanging, or Using Virtual Currencies](https://www.fincen.gov/sites/default/files/shared/FIN-2013-G001.pdf) (Mar. 18, 2013)
  * Initial guidance from FinCEN addressing who within the virtual currency industry is considered a money transmitter.

#### Commentary & Analysis

* [Electronic Cash, Decentralized Exchange, and the Constitution](https://coincenter.org/files/e-cash-dex-constitution.pdf) by Peter Van Valkenburgh - Coin Center (March 2019)
* [The Bank Secrecy Act, Cryptocurrencies and New Tokens: What is Known and What Remains Ambiguous](https://coincenter.org/files/2017-05/report-bsa-crypto-token1.pdf) by Peter Van Valkenburgh - Coin Center (May 2017)

{% hint style="info" %}
**The information provided in this document is based on the guidance provided by** [**0x** ](https://www.0x.org/)**in their** [**0x Legal Guide**](https://docs.0x.org/developer-resources/0x-legal-guide)**.**
{% endhint %}


# White Paper

Abyiss original white paper for historical context.

The following is the original white paper for Abyiss, released in 2020. This was the original v1 of the company. Please note that some of the concepts in here are no longer up-to-date, and this information is shared here for historical context, and not meant as a technical reference.

{% embed url="<https://drive.google.com/file/d/13iZE1qaMfUf0y0F608tcPhYsMfwfstPm/view?usp=sharing>" %}
Abyiss White Paper
{% endembed %}


# Deprecated

Deprecated APIs and data endpoints.

Deprecated APIs and data endpoints.


# Crypto APIs /v1 - REST APIs

Centralized exchange REST APIs documentation.

Welcome to Abyiss Centralized Exchange REST API documentation! This page contains information about the reference data and market data endpoints available for our centralized exchange APIs.

## Authentication&#x20;

To use our REST API, you'll need an account and an API Key. If you don't have one yet, create an [account with Abyiss](https://abyiss.com/signin) and learn more about [API Keys and Authorization](/introduction/api-architecture/api-keys-authentication) in our Authentication section.

## Endpoints&#x20;

Our REST API provides access to market data endpoints that contain real-time and historical data about supported exchanges and their symbols. The following data endpoints are available:

* [Current Price](broken://pages/JEguIRNqdxYBm3vjSCAK)
* [Aggregates (Bars)](broken://pages/6YBIBYvPekDeouW8vZXH)
* [Trades](broken://pages/3F3DCE2gX61b57mTfeGH)
* [Snapshot](broken://pages/PhXb87qWO8H90arO9mdr)
* [Order Books](broken://pages/JyIrE8BwxVPIX6hzsoGL)
* [Liquidity ](broken://pages/1uSnidPoPNHMIsxbOuCW)
* [Whales](broken://pages/6pfDCdgIxaSNeo1vxucg)

## Pro Tips for Reading Documentation&#x20;

To better understand our documentation, here are some pro tips to keep in mind:

* **Be patient**: Take your time to go through the documentation to avoid missing important details.
* **Review terms**: Make sure to familiarize yourself with key terms and definitions used in the documentation.
* **Read slowly**: Read each section of the documentation slowly and carefully to ensure that you understand everything.
* **Reread things**: If you're having trouble understanding a particular section, reread it or consult external resources.
* **Click the drop-down arrows**: Expand the sections and sub-sections to see more detailed information.
* **Read the overviews**: Start with the overviews to get a general idea of the information available in the documentation.
* **Google anything you don't understand**: If you encounter unfamiliar terms or concepts, Google them to learn more.
* **Contact us if you're having trouble**: If you're still having trouble understanding our documentation, don't hesitate to contact our support team for assistance.

That's it! We hope this page helps you understand our REST API better. If you have any questions or concerns, please don't hesitate to contact our [support team](https://abyiss.com/contact).


# Exchanges

Get exchanges endpoint returns all crypto exchanges Abyiss supports.

## Get Exchanges

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/exchanges`

Returns an array of all supported exchanges in the form of market objects.

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
    {
        "name":"Binance",
        "id":"binance"
    },
    {
        "name":"Binance US",
        "id":"binanceus"
    },
    {
        "name":"Coinbase Pro",
        "id":"coinbasepro"
    },
    {
        "name":"BitBay",
        "id":"bitbay"
    }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/exchanges
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey)

exchanges = client.getExchanges()

print(exchanges)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/exchanges?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/exchanges?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/exchanges?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v1/exchanges?apiKey=>

```json
{
    "name":"Binance",
    "id":"binance"
},
{
    "name":"Coinbase Pro",
    "id":"coinbasepro"
},
```

### Response Attributes

| Attribute Name | Data Type | Description                                |
| -------------- | --------- | ------------------------------------------ |
| name           | string    | The official name of the exchange.         |
| id             | string    | Unique exchange identifier used by Abyiss. |


# Exchanges Count

Get exchanges count returns the number of crypto exchanges Abyiss supports.

## Get Exchange Count

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/exchanges/count`

Returns the number of crypto exchanges Abyiss supports.

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "count": 118
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/exchanges/count
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v1/exchanges/count?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/exchanges/count?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/exchanges/count?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/exchanges/count?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v1/exchanges/count?apiKey=>

```json
{
    "count": 118
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                    |
| -------------- | --------- | ---------------------------------------------- |
| count          | integer   | The number of Crypto Exchanges Abyiss supports |


# Exchange Data

Get exchange data returns information about a crypto exchange.

## Get Exchange Data

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/{exchange}`

Returns an object with properties about the exchange.

#### Path Parameters

| Name                                       | Type   | Description                                |
| ------------------------------------------ | ------ | ------------------------------------------ |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "name": "Coinbase Pro",
    "id": "coinbasepro",
    "countries": [
        "US"
    ],
    "hasTrades": true,
    "hasAggregates": true,
    "aggregateTimeframes": {
        "1m": 60,
        "5m": 300,
        "15m": 900,
        "1h": 3600,
        "6h": 21600,
        "1d": 86400
    },
    "url": "https://pro.coinbase.com/",
    "fees": [
        "https://docs.pro.coinbase.com/#fees",
        "https://support.pro.coinbase.com/customer/en/portal/articles/2945310-fees"
    ],
    "docs": "https://docs.pro.coinbase.com",
    "logo": "https://user-images.githubusercontent.com/1294454/41764625-63b7ffde-760a-11e8-996d-a6328fa9347a.jpg"
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/coinbasepro
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey)

exchangeDetails = client.getExchangeDetails("coinbasepro")

print(exchangeDetails)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/coinbasepro?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/coinbasepro?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/coinbasepro?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v1/coinbasepro?apiKey=>

```json
{
    "name": "Coinbase Pro",
    "id": "coinbasepro",
    "countries": [
        "US"
    ],
    "hasTrades": true,
    "hasAggregates": true,
    "aggregateTimeframes": {
        "1m": 60,
        "5m": 300,
        "15m": 900,
        "1h": 3600,
        "6h": 21600,
        "1d": 86400
    },
    "url": "https://pro.coinbase.com/",
    "fees": [
        "https://docs.pro.coinbase.com/#fees",
        "https://support.pro.coinbase.com/customer/en/portal/articles/2945310-fees"
    ],
    "docs": "https://docs.pro.coinbase.com",
    "logo": "https://user-images.githubusercontent.com/1294454/41764625-63b7ffde-760a-11e8-996d-a6328fa9347a.jpg"
}
```

### Response Attribute

| Attribute Name      | Data Type          | Description                                                                 |
| ------------------- | ------------------ | --------------------------------------------------------------------------- |
| name                | string             | The official name of the exchange.                                          |
| id                  | string             | Unique identifier used by Abyiss for the exchange.                          |
| countries           | object             | The countries abbreviations the exchange is located in.                     |
| hasTrades           | boolean            | Can query market trades.                                                    |
| hasAggregates       | boolean            | Can query market candle aggregates. (1m, 5m, 15m, 1h, 6h, 1d)               |
| aggregateTimeframes | object             | Timeframes supported for market candle aggregates. (Spot, Derivatives, Dex) |
| url                 | string             | Exchange's official website URL.                                            |
| fees                | object \|\| string | The URL to for Exchange Fee Structure.                                      |
| docs                | string             | The URL for the Exchange Documentation.                                     |
| logo                | string             | The URL to the Exchange Logos.                                              |


# Exchange Status

Get exchange status returns the current status of a crypto exchange.

## Get Exchange Status

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/{exchange}/status`

Returns an object with properties that describe an exchange's status.

#### Path Parameters

| Name                                       | Type   | Description                                |
| ------------------------------------------ | ------ | ------------------------------------------ |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss. |

#### Query Parameters

| Name   | Type   | Description         |
| ------ | ------ | ------------------- |
| apiKey | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "status":"ok",
    "updated":1634929487916
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/coinbasepro/status
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey)

exchangeStatus = client.getExchangeStatus("coinbasepro")

print(exchangeStatus)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/coinbasepro/status?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/coinbasepro/status?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```javascript
require 'net/http'
uri = URI("https://api.abyiss.com/v1/coinbasepro/status?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object&#x20;

Example URL: <https://api.abyiss.com/v1/coinbasepro/status?apiKey=>

```json
{
    "status":"ok",
    "updated":1634929487916
}
```

### Response Attribute

| Attribute Name | Data Type | Description                                                      |
| -------------- | --------- | ---------------------------------------------------------------- |
| status         | string    | Status of the exchange. 'ok' is good.                            |
| updated        | integer   | Unix timestamp of the last time the exchange status was updated. |


# Exchange Markets

Get exchange markets returns all crypto pairs on a crypto exchange.

## Get Exchange Markets

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/{exchange}/markets`

Returns an array of all crypto pair ids on the exchange.

#### Path Parameters

| Name                                       | Type   | Description                                |
| ------------------------------------------ | ------ | ------------------------------------------ |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
    "OGN/BTC",
    "REQ/BTC",
    "KEEP/USD",
    "AAVE/USD",
    "SKL/GBP",
    "MIR/EUR",
    "FORTH/EUR",
    "DOT/USDT"
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/coinbasepro/markets
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey) 

exchangeMarkets = client.getExchangeMarkets("coinbasepro")

print(exchangeMarkets)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/coinbasepro/markets?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/coinbasepro/markets?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/coinbasepro/markets?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v1/coinbasepro/markets?apiKey=>

```json
[
    "BTC/USD",
    "ETH/USD",
    "DOGE/USD",
    "DOT/USDT"
]
```

### Response Attribute

| Attribute Name | Data Type | Description                                         |
| -------------- | --------- | --------------------------------------------------- |
| pair id        | string    | Unique Crypto Pair identifier used by the exchange. |


# Market Details

Get market details returns information about a crypto pair.

## Get Market Details

<mark style="color:blue;">`GET`</mark> `https://api.abyis.com/v1/{exchange}/{market}`

Returns an object with properties about the crypto pair.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange":"coinbasepro",
    "symbol":"BTC/USD",
    "id":"BTC-USD",
    "active":true,
    "base":"BTC",
    "quote":"USD",
    "percentage":true,
    "taker":0.005,
    "maker":0.005,
    "type":"spot"
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/coinbasepro/BTC-USD
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey) 

exchangeMarketDetails = client.getMarketDetails("coinbasepro", "BTC-USD")

print(exchangeMarketDetails)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/coinbasepro/BTC-USD?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/coinbasepro/BTC-USD?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/coinbasepro/BTC-USD?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v1/coinbasepro/BTC-USD?apiKey=>

```json
{
    "exchange":"coinbasepro",
    "symbol":"BTC/USD",
    "id":"BTC-USD",
    "active":true,
    "base":"BTC",
    "quote":"USD",
    "percentage":true,
    "taker":0.005,
    "maker":0.005,
    "type":"spot"
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                                                  |
| -------------- | --------- | ---------------------------------------------------------------------------- |
| exchange       | string    | Unique identifier used by Abyiss for the exchange.                           |
| symbol         | string    | The symbol of the market.                                                    |
| id             | string    | Unique identifier used by Abyiss for the market.                             |
| active         | boolean   | Whether the market is active on the exchange.                                |
| base           | string    | The base of the market. eg: The quantity that is bought.                     |
| quote          | string    | The quote of the market. eg: The currency being compared.                    |
| percentage     | boolean   | Whether the taker and maker fee rate is a multiplier or a fixed flat amount. |
| taker          | float     | Taker fee rate, 0.002 = 0.2%.                                                |
| maker          | float     | Maker fee rate, 0.0016 = 0.16%.                                              |
| type           | string    | Exchange type that the market is listed on.                                  |


# Current Price

Get current price returns the real-time price of a crypto pair.

## Get Current Price

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/{exchange}/{market}/currentprice`

Returns an object with the real-time price of a crypto pair.&#x20;

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | sring  | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "timestamp": "1644510051396",
    "price": 45202.18
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/coinbasepro/BTC-USD/currentprice
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v1/coinbasepro/BTC-USD/currentprice?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/coinbasepro/BTC-USD/currentprice?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/coinbasepro/BTC-USD/currentprice?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/coinbasepro/BTC-USD/currentprice?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v1/coinbasepro/BTC-USD/currentprice?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "timestamp": "1644510051396",
    "price": 45202.18
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                        |
| -------------- | --------- | -------------------------------------------------- |
| exchange       | string    | Unique identifier used by Abyiss for the exchange. |
| market         | string    | Unique identifier used by the exchange for ticker. |
| timestamp      | string    | Unix timestamp of the current price.               |
| price          | float     | The latest price of the crypto asset.              |


# Aggregates (Bars)

Get aggregates returns candlestick bars for a crypto pair.

## Get Aggregates (Bars)

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/{exchange}/{market}/aggregates/{aggregate size}`

Returns an object with the latest aggregates or candlesticks of a crypto pair.

#### Path Parameters

| Name                                             | Type   | Description                                                        |
| ------------------------------------------------ | ------ | ------------------------------------------------------------------ |
| exchange<mark style="color:red;">\*</mark>       | string | Unique exchange identifier used by Abyiss.                         |
| market<mark style="color:red;">\*</mark>         | string | Unique Crypto Pair identifier used by the exchange.                |
| aggregate size<mark style="color:red;">\*</mark> | string | Aggregate bar or candlestick time frame. (1m, 5m, 15m, 1h, 6h, 1d) |

#### Query Parameters

| Name                                     | Type   | Description                                                             |
| ---------------------------------------- | ------ | ----------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key                                                     |
| limit                                    | string | Number of results per request. Maximum 50,000. (default 200)            |
| since                                    | number | Unix Timestamp from where you want the data to start. (Historical Data) |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "aggregates": [
        {
        "t": 1644496320000,
        "o": 44714.52,
        "h": 44770.05,
        "l": 44714.52,
        "c": 44751.17,
        "v": 2.88395739
        },
        {
        "t": 1644496380000,
        "o": 44752,
        "h": 44753.14,
        "l": 44713.07,
        "c": 44747.05,
        "v": 10.80901469
        },
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/coinbasepro/BTC-USD/aggregates/1m
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey)

aggregates = client.aggregates("coinbasepro", "BTC-USD", "1m", "250")

print(aggregates)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/coinbasepro/BTC-USD/aggregates/1m?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/coinbasepro/BTC-USD/aggregates/1m?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```javascript
require 'net/http'
uri = URI("https://api.abyiss.com/v1/coinbasepro/BTC-USD/aggregates/1m?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v1/coinbasepro/BTC-USD/aggregates/1m?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "aggregates": [
        {
        "t": 1644496320000,
        "o": 44714.52,
        "h": 44770.05,
        "l": 44714.52,
        "c": 44751.17,
        "v": 2.88395739
        },
}
```

### Response Attributes <a href="#response-attributes" id="response-attributes"></a>

| Attribute Name | Data Type | Description                                         |
| -------------- | --------- | --------------------------------------------------- |
| exchange       | string    | Unique identifier used by Abyiss for the exchange.  |
| market         | string    | Unique identifier used by the exchange for ticker.  |
| aggregates     | array     | Array of Aggregates                                 |
| t              | integer   | Unix timestamp at the start of the aggregate.       |
| o              | float     | The open or first price of the aggregate.           |
| h              | float     | The highest price of the aggregate.                 |
| l              | float     | The lowest price of the aggregate.                  |
| c              | float     | The close or last price of the aggregate.           |
| v              | float     | The volume or quantity traded within the aggregate. |


# Last Aggregate

Get last aggregate returns the latest aggregate bar for a crypto pair.

## Get Last Aggregate

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/{exchange}/{market}/lastaggregate/{aggregate size}`

Returns an object with the latest aggregate or candlestick of a crypto pair.

#### Path Parameters

| Name                                             | Type   | Description                                                        |
| ------------------------------------------------ | ------ | ------------------------------------------------------------------ |
| exchange<mark style="color:red;">\*</mark>       | string | Unique exchange identifier used by Abyiss.                         |
| market<mark style="color:red;">\*</mark>         | string | Unique Crypto Pair identifier used by the exchange.                |
| aggregate size<mark style="color:red;">\*</mark> | string | Aggregate bar or candlestick time frame. (1m, 5m, 15m, 1h, 6h, 1d) |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "timeframe": "1m",
    "t": 1644515400000,
    "o": 45203.6,
    "h": 45216.72,
    "l": 45183.93,
    "c": 45200.37,
    "v": 5.43995508
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/coinbasepro/BTC-USD/lastaggregate/1m?apiKey=*
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v1/coinbasepro/BTC-USD/lastaggregate/1m?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/coinbasepro/BTC-USD/lastaggregate/1m?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/coinbasepro/BTC-USD/lastaggregate/1m?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/coinbasepro/BTC-USD/lastaggregate/1m?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v1/coinbasepro/BTC-USD/lastaggregate/1m?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "timeframe": "1m",
    "t": 1644515400000,
    "o": 45203.6,
    "h": 45216.72,
    "l": 45183.93,
    "c": 45200.37,
    "v": 5.43995508
}
```

### Response Attributes&#x20;

| Attribute Name | Data Type | Description                                                        |
| -------------- | --------- | ------------------------------------------------------------------ |
| exchange       | string    | Unique identifier used by Abyiss for the exchange.                 |
| market         | string    | Unique identifier used by the exchange for ticker.                 |
| timeframe      | string    | Aggregate bar or candlestick time frame. (1m, 5m, 15m, 1h, 6h, 1d) |
| t              | integer   | Unix timestamp at the start of the aggregate.                      |
| o              | float     | The open or first price of the aggregate.                          |
| h              | float     | The highest price of the aggregate.                                |
| l              | float     | The lowest price of the aggregate.                                 |
| c              | float     | The close or last price of the aggregate.                          |
| v              | float     | The volume or quantity traded within the aggregate.                |


# Trades

Get last aggregate returns the latest aggregate bar for a crypto pair.

## Get Trades

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/{exchange}/{market}/trades`

Returns an object with recent trades for a crypto pair on an exchange.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description                                                             |
| ---------------------------------------- | ------ | ----------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key                                                     |
| limit                                    | string | Number of results per request. Maximum 50,000. (default 200)            |
| since                                    | number | Unix Timestamp from where you want the data to start. (Historical Data) |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "trades": [
        {
            "id": "279352169",
            "timestamp": "1644524462830",
            "price": 44322.55,
            "size": 0.02209576,
            "cost": 979.340427388,
            "side": "buy"
        },
        {
            "id": "279352170",
            "timestamp": "1644524463216",
            "price": 44322.55,
            "size": 0.00030296,
            "cost": 13.427959748000001,
            "side": "buy"
        },
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/coinbasepro/BTC-USD/trades
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY"
client = Abyiss.Client(apiKey)

trades = client.trades("coinbasepro", "BTC-USD", "250")

print(trades)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/coinbasepro/BTC-USD/trades?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/coinbasepro/BTC-USD/trades?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/coinbasepro/BTC-USD/trades?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v1/coinbasepro/BTC-USD/trades?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "trades": [
        {
            "id": "279352169",
            "timestamp": "1644524462830",
            "price": 44322.55,
            "size": 0.02209576,
            "cost": 979.340427388,
            "side": "buy"
        },
    ]
}
```

### Response Attributes

<table><thead><tr><th width="150">Attribute Name</th><th width="150">Data Type</th><th>Description</th></tr></thead><tbody><tr><td>exchange</td><td>string</td><td>The exchange id the trade occurred on.</td></tr><tr><td>market</td><td>string</td><td>The crypto pair that was traded.</td></tr><tr><td>trades</td><td>array</td><td>An array of trades</td></tr><tr><td>id</td><td>string</td><td>The exchange specific unique id of the trade.</td></tr><tr><td>timestamp</td><td>string</td><td>The Unix timestamp that trade was executed.</td></tr><tr><td>price</td><td>float</td><td>The quote currency price of the market.</td></tr><tr><td>size</td><td>float</td><td>The quantity traded.</td></tr><tr><td>cost</td><td>float</td><td>The quote cost: (size * price).</td></tr><tr><td>side</td><td>string</td><td>Whether the trade was a buy or sell.</td></tr></tbody></table>


# Last Trade

Get last trade returns the most recent trade for a crypto pair.

## Get Last Trade

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/{exchange}/{market}/lasttrade`

Returns an object containing the latest trade for a crypto pair on an exchange.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "id": "279363545",
    "timestamp": "1644525461042",
    "price": 43990.48,
    "size": 0.00608355,
    "cost": 267.618284604,
    "side": "buy"
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/coinbasepro/BTC-USD/lasttrade
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v1/coinbasepro/BTC-USD/lasttrade?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/coinbasepro/BTC-USD/lasttrade?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/coinbasepro/BTC-USD/lasttrade?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/coinbasepro/BTC-USD/lasttrade?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v1/coinbasepro/BTC-USD/lasttrade?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "id": "279363545",
    "timestamp": "1644525461042",
    "price": 43990.48,
    "size": 0.00608355,
    "cost": 267.618284604,
    "side": "buy"
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                   |
| -------------- | --------- | --------------------------------------------- |
| exchange       | string    | The exchange id the trade occurred on.        |
| market         | string    | The crypto pair that was traded.              |
| id             | string    | The exchange specific unique id of the trade. |
| timestamp      | string    | The Unix timestamp that trade was executed.   |
| price          | float     | The quote currency price of the market.       |
| size           | float     | The quantity traded.                          |
| cost           | float     | The quote cost: (size \* price).              |
| side           | string    | Whether the trade was a buy or sell.          |


# Snapshot

Get snapshot returns the current price and aggregates of a crypto pair.

## Get Snapshot

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/{exchange}/{market}/snapshot`

Returns an object with the current price and latest aggregates of a crypto pair.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "currentPrice": {
    "timestamp": "1644514081304",
    "price": 45664.68
    },
    "lastAggregates": [
        {
        "timeframe": "1m",
        "t": 1644514020000,
        "o": 45611.24,
        "h": 45642.66,
        "l": 45603.99,
        "c": 45633.36,
        "v": 3.06919763
        },
        {
        "timeframe": "5m",
        "t": 1644513600000,
        "o": 45609.98,
        "h": 45618.75,
        "l": 45518.29,
        "c": 45556.56,
        "v": 68.72929794
        },
        {
        "timeframe": "15m",
        "t": 1644513300000,
        "o": 45700,
        "h": 45855,
        "l": 45518.29,
        "c": 45674.69,
        "v": 325.19832174
        },
        {
        "timeframe": "1h",
        "t": 1644512400000,
        "o": 45428.67,
        "h": 45855,
        "l": 45350,
        "c": 45553.23,
        "v": 539.73451388
        },
        {
        "timeframe": "6h",
        "t": 1644494400000,
        "o": 44871.79,
        "h": 45855,
        "l": 43210,
        "c": 45635.08,
        "v": 8832.20007482
        },
        {
        "timeframe": "1d",
        "t": 1644451200000,
        "o": 44416.39,
        "h": 45855,
        "l": 43210,
        "c": 45633.36,
        "v": 13322.95932161
        }
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/coinbasepro/BTC-USD/snapshot
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v1/coinbasepro/BTC-USD/snapshot?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/coinbasepro/BTC-USD/snapshot?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/coinbasepro/BTC-USD/snapshot?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/coinbasepro/BTC-USD/snapshot?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v1/coinbasepro/BTC-USD/snapshot?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC/USD",
    "currentPrice": {
    "timestamp": "1644514081304",
    "price": 45664.68
    },
    "lastAggregates": [
        {
        "timeframe": "1m",
        "t": 1644514020000,
        "o": 45611.24,
        "h": 45642.66,
        "l": 45603.99,
        "c": 45633.36,
        "v": 3.06919763
        },
        {
        "timeframe": "5m",
        "t": 1644513600000,
        "o": 45609.98,
        "h": 45618.75,
        "l": 45518.29,
        "c": 45556.56,
        "v": 68.72929794
        },
        {
        "timeframe": "15m",
        "t": 1644513300000,
        "o": 45700,
        "h": 45855,
        "l": 45518.29,
        "c": 45674.69,
        "v": 325.19832174
        },
        {
        "timeframe": "1h",
        "t": 1644512400000,
        "o": 45428.67,
        "h": 45855,
        "l": 45350,
        "c": 45553.23,
        "v": 539.73451388
        },
        {
        "timeframe": "6h",
        "t": 1644494400000,
        "o": 44871.79,
        "h": 45855,
        "l": 43210,
        "c": 45635.08,
        "v": 8832.20007482
        },
        {
        "timeframe": "1d",
        "t": 1644451200000,
        "o": 44416.39,
        "h": 45855,
        "l": 43210,
        "c": 45633.36,
        "v": 13322.95932161
        }
    ]
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                                        |
| -------------- | --------- | ------------------------------------------------------------------ |
| exchange       | string    | Unique identifier used by Abyiss for the exchange.                 |
| market         | string    | Unique identifier used by the exchange for ticker.                 |
| currentPrice   | object    | Object with the time and price                                     |
| timestamp      | string    | Unix timestamp of the current price.                               |
| price          | float     | The latest price of the crypto asset.                              |
| timeframe      | string    | Aggregate bar or candlestick time frame. (1m, 5m, 15m, 1h, 6h, 1d) |
| lastAggregates | array     | Array of aggregates                                                |
| t              | integer   | Unix timestamp at the start of the aggregate.                      |
| o              | float     | The open or first price of the aggregate.                          |
| h              | float     | The highest price of the aggregate.                                |
| l              | float     | The lowest price of the aggregate.                                 |
| c              | float     | The close or last price of the aggregate.                          |
| v              | float     | The volume or quantity traded within the aggregate.                |


# Order Books

Get order books returns a full order book for a crypto pair from an exchange.

## Get Level 2 Orderbook

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/{exchange}/{market}/orders`

Returns a snapshot of the recent level 2 orderbook for a crypto pair on an exchange.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
{
    "exchange":"coinbasepro",
    "market":"BTC/USD",
    "nonce":14601360013,
    "bids":
    [
        [
            61947.91,
            1.48088
        ],
        [
            61947.9,
            0.5
        ],
        [
            61944.07,
            0.44094
        ]
    ],
    "asks":
    [
        [
            61947.92,
            2.28573
        ],
        [
            61952.89,
            0.11214
        ],
        [
            61952.9,
            0.50224
        ]
    ]
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/coinbasepro/BTC-USD/orders?apiKey=*
```

{% endtab %}

{% tab title="Python" %}

```python
from Abyiss import Abyiss

apiKey = "YOUR API KEY" 
client = Abyiss.Client(apiKey)

orderbook = client.orderBook("coinbasepro", "BTC-USDT")

print(orderBook)
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/coinbasepro/BTC-USD/orders?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/coinbasepro/BTC-USD/orders?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/coinbasepro/BTC-USD/orders?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v1/coinbasepro/BTC-USD/orders?apiKey=>

```json
{
    "exchange":"coinbasepro",
    "market":"BTC/USD",
    "nonce":14601360013,
    "bids":
    [
        [
            61947.91,
            1.48088
        ],
        [
            61947.9,
            0.5
        ],
        [
            61944.07,
            0.44094
        ]
    ],
    "asks":
    [
        [
            61947.92,
            2.28573
        ],
        [
            61952.89,
            0.11214
        ],
        [
            61952.9,
            0.50224
        ]
    ]
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                                      |
| -------------- | --------- | ---------------------------------------------------------------- |
| exchange       | string    | The exchange id the order book is from.                          |
| market         | string    | The crypto pair the order book is about.                         |
| nonce          | integer   | The serial unique identifier of the order book on the exchange.  |
| bids           | array     | Arrays of bids in the market \[\[float, float], \[float, float]] |
| asks           | array     | Arrays of asks in the market \[\[float, float], \[float, float]] |


# Liquidity

Get liquidity returns the total liquidity for a crypto pair on an exchange.

{% hint style="danger" %}
**The `liquidity` endpoint is in beta. We do not recommend use in production.**&#x20;
{% endhint %}

## Get Liquidity

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/liquidity/{exchange}/{market}`

Returns an object containing the total liquidity for a crypto pair on an exchange.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

<pre class="language-javascript"><code class="lang-javascript">{
<strong>    "exchange": "coinbasepro",
</strong>    "market": "BTC-USD",
    "nonce": 5640375978,
    "liquidity": 37224813.18828725
}
</code></pre>

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/liquidity/coinbasepro/btc-usd
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/liquidity/coinbasepro/btc-usd?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/liquidity/coinbasepro/btc-usd?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/liquidity/coinbasepro/btc-usd?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/liquidity/coinbasepro/btc-usd?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

Example URL: <https://api.abyiss.com/v2/liquidity/coinbasepro/btc-usd?apiKey=>

```json
{
    "exchange": "coinbasepro",
    "market": "BTC-USD",
    "nonce": 5640375978,
    "liquidity": 37224813.18828725
}
```

### Response Attributes

| Attribute Name | Data Type | Description                                                     |
| -------------- | --------- | --------------------------------------------------------------- |
| exchange       | string    | The exchange id.                                                |
| market         | string    | The crypto pair.                                                |
| nonce          | integer   | The serial unique identifier of the order book on the exchange. |
| liquidity      | integer   | The total liquidity for a crypto market pair.                   |


# Whales

Get whales returns large crypto trades for a crypto pair from an exchange.

{% hint style="danger" %}
**The `whales` endpoint is in beta. We do not recommend use in production.**&#x20;
{% endhint %}

## Get Whales

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/whales/{exchange}/{market}`

Returns an object containing large crypto trades for a crypto pair on an exchange.

#### Path Parameters

| Name                                       | Type   | Description                                         |
| ------------------------------------------ | ------ | --------------------------------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | Unique exchange identifier used by Abyiss.          |
| market<mark style="color:red;">\*</mark>   | string | Unique Crypto Pair identifier used by the exchange. |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "name": "BTC-USD",
    "exchangeId": "coinbasepro",
    "base": "BTC",
    "quote": "USD",
    "whales": {
        "nodes": [
            {
                "cost": 220116.966516,
                "id": 18332,
                "idOnExchange": "456861288",
                "insertedAt": "2022-11-17T15:49:18.878",
                "price": 16560,
                "side": "buy",
                "size": 13.29208735
            },
        ]
    }
}
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## Get Whales Today

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v2/whales/today`

Returns an object containing the most recent or newest top 50 large crypto trades within the day.

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```json
{
    "cost": 313438.248,
    "id": 18336,
    "idOnExchange": "1025921603",
    "insertedAt": "2022-11-18T05:21:40.879",
    "market": {
        "name": "ETH-USDT",
        "exchangeId": "binance",
        "base": "ETH",
        "quote": "USDT"
    },
    "price": 1224,
    "side": "sell",
    "size": 256.077
},
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### Copy & Paste Code

{% tabs %}
{% tab title="Curl" %}

```shell
curl -H "apiKey: API KEY" https://api.abyiss.com/v2/whales/coinbasepro/btc-usd
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v2/whales/coinbasepro/btc-usd?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v2/whales/coinbasepro/btc-usd?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v2/whales/coinbasepro/btc-usd?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v2/whales/coinbasepro/btc-usd?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### Response Object

{% tabs %}
{% tab title="Whales" %}
Example URL: <https://api.abyiss.com/v2/whales/coinbasepro/btc-usd?apiKey=>

```json
{
    "name": "BTC-USD",
    "exchangeId": "coinbasepro",
    "base": "BTC",
    "quote": "USD",
    "whales": {
        "nodes": [
            {
                "cost": 220116.966516,
                "id": 18332,
                "idOnExchange": "456861288",
                "insertedAt": "2022-11-17T15:49:18.878",
                "price": 16560,
                "side": "buy",
                "size": 13.29208735
            },
        ]
    }
}
```

{% endtab %}

{% tab title="Whales Today" %}
Example URL: <https://api.abyiss.com/v2/whales/today?apiKey=>

```json
{
    "cost": 313438.248,
    "id": 18336,
    "idOnExchange": "1025921603",
    "insertedAt": "2022-11-18T05:21:40.879",
    "market": {
        "name": "ETH-USDT",
        "exchangeId": "binance",
        "base": "ETH",
        "quote": "USDT"
    },
    "price": 1224,
    "side": "sell",
    "size": 256.077
},
```

{% endtab %}
{% endtabs %}

### Response Attributes

| Attribute Name | Data Type | Description                                               |
| -------------- | --------- | --------------------------------------------------------- |
| name           | string    | Unique identifier used by the exchange for ticker.        |
| exchangeId     | string    | The exchange id.                                          |
| base           | string    | The base of the market. eg: The quantity that is bought.  |
| quote          | string    | The quote of the market. eg: The currency being compared. |
| cost           | integer   | The quote cost: (size \* price).                          |
| id             | integer   | The exchange specific unique id of the trade.             |
| idOnExchange   | string    | Unique identifier used by the exchange for trade.         |
| insertedAt     | string    | Unix timestamp of the trade.                              |
| price          | integer   | The price the trade was executed at.                      |
| side           | string    | Whether the trade was a buy or sell.                      |
| size           | integer   | The quantity traded.                                      |


# Blockchain APIs /v1 - REST APIs

Decentralized exchange REST APIs documentation.

Welcome to Abyiss Decentralized Exchange REST API documentation! This page contains information about the reference data and market data endpoints available for our decentralized exchange APIs.

## Authentication

To use our REST API, you'll need an account and an API Key. If you don't have one yet, create an [account with Abyiss](https://abyiss.com/signin) and learn more about [API Keys and Authorization](/introduction/api-architecture/api-keys-authentication) in our Authentication section.

## Endpoints & Data

Our REST API also provides access to market data and reference data endpoints that contain real-time and historical data about supported exchanges and their symbols.

The following endpoints are available:

* [Exchanges](/blockchain-api/rest-apis/exchanges)
* [Blockchains](/blockchain-api/rest-apis/blockchains)
* [Exchange Data](/blockchain-api/rest-apis/exchange-data)
* [Tokens](/blockchain-api/rest-apis/tokens)
* [Token Data](/blockchain-api/rest-apis/token-data)
* [Token Aggregates (Bars)](/blockchain-api/rest-apis/token-aggregates-bars)
* [Liquidity Pool](/blockchain-api/rest-apis/pools)
* [Liquidity Pool Aggregates (Bars)](/blockchain-api/rest-apis/pool-aggregates-bars)

## Pro Tips for Reading Documentation

To better understand our documentation, here are some pro tips to keep in mind:

* **Be patient**: Take your time to go through the documentation to avoid missing important details.
* **Review terms**: Make sure to familiarize yourself with key terms and definitions used in the documentation.
* **Read slowly**: Read each section of the documentation slowly and carefully to ensure that you understand everything.
* **Reread things**: If you're having trouble understanding a particular section, reread it or consult external resources.
* **Click the drop-down arrows**: Expand the sections and sub-sections to see more detailed information.
* **Read the overviews**: Start with the overviews to get a general idea of the information available in the documentation.
* **Google anything you don't understand**: If you encounter unfamiliar terms or concepts, Google them to learn more.
* **Contact us if you're having trouble**: If you're still having trouble understanding our documentation, don't hesitate to contact our support team for assistance.

That's it! We hope this page helps you understand our REST API better. If you have any questions or concerns, please don't hesitate to contact our [support team](https://abyiss.com/contact).


# Exchanges

Get exchanges returns all decentralized exchanges supported by Abyiss.

## Get Exchanges

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/dex`

Returns an array of all supported decentralized exchanges.

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
    {
        "name": "Uniswap",
        "id": "uniswap"
    }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/dex
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v1/dex?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/dex?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/dex?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/dex?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v1/dex?apiKey=>

```json
[
    {
        "name": "Uniswap",
        "id": "uniswap"
    }
]
```

### Response Attributes

| Attribute Name | Data Type | Description                                |
| -------------- | --------- | ------------------------------------------ |
| name           | string    | The official name of the exchange.         |
| id             | string    | Unique exchange identifier used by Abyiss. |


# Blockchains

Get blockchains returns the supported blockchains for a decentralized exchange.

## Get Exchange Blockchains

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/dex/{exchange}`

Returns an array of supported blockchains for a decentralized exchange.

#### Path Parameters

| Name                                       | Type   | Description                |
| ------------------------------------------ | ------ | -------------------------- |
| exchange<mark style="color:red;">\*</mark> | string | The decentralized exchange |

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
    {
        "id": "ethereum",
        "name": "Ethereum"
    },
    {
        "id": "polygon",
        "name": "Polygon"
    },
    {
        "id": "optimism",
        "name": "Optimism"
    },
    {
        "id": "celo",
        "name": "Celo"
    },
    {
        "id": "arbitrum",
        "name": "Arbitrum"
    },
    {
        "id": "binance",
        "name": "Binance Smart Chain"
    }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/dex/uniswap
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v1/dex/uniswap?apiKey=*"
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/dex/uniswap?apiKey=*")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/dex/uniswap?apiKey=*")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/dex/uniswap?apiKey=*")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v1/dex/uniswap?apiKey=>

```json
[
    {
        "id": "ethereum",
        "name": "Ethereum"
    },
    {
        "id": "polygon",
        "name": "Polygon"
    },
    {
        "id": "optimism",
        "name": "Optimism"
    },
    {
        "id": "celo",
        "name": "Celo"
    },
    {
        "id": "arbitrum",
        "name": "Arbitrum"
    },
    {
        "id": "binance",
        "name": "Binance Smart Chain"
    }
]
```

### Response Attributes

| Attribute Name | Data Type | Description                                      |
| -------------- | --------- | ------------------------------------------------ |
| id             | string    | Unique exchange identifier used by Abyiss.       |
| name           | string    | The official name of the decentralized exchange. |


# Blocks

Get blocks returns real-time or historical blockchain block numbers and timestamps.

## Get Blocks

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/blocks`

Provides a list of compatible blockchains for retrieving block numbers and timestamps in an array.

#### Query Parameters

| Name                                     | Type   | Description         |
| ---------------------------------------- | ------ | ------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key |

{% tabs %}
{% tab title="200: OK Success" %}

```json
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```json
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

## Get Blockchain Blocks

<mark style="color:blue;">`GET`</mark> `https://api.abyiss.com/v1/blocks/{blockchain}`

Returns an array of real-time or historical blockchain block numbers and timestamps.&#x20;

#### Path Parameters

| Name                                         | Type   | Description                       |
| -------------------------------------------- | ------ | --------------------------------- |
| blockchain<mark style="color:red;">\*</mark> | string | Blockchain for the block numbers. |

#### Query Parameters

| Name                                     | Type   | Description                                                                                                    |
| ---------------------------------------- | ------ | -------------------------------------------------------------------------------------------------------------- |
| apiKey<mark style="color:red;">\*</mark> | string | Your Abyiss API Key                                                                                            |
| limit                                    | int    | Number of results per request. Maximum 1,0000 (defualt 100)                                                    |
| skip                                     | int    | Number of results to skip per request.                                                                         |
| orderBy                                  | string | Sort the returned data by any field in the API response, such as `id`, `name`, `symbol`, `volumeUSD` and more. |
| orderDirection                           | string | `asc` or `desc` return the results sorted by that field in either ascending or descending order.               |
| block                                    | int    | The blockchain block number for historical data.                                                               |
| from                                     | int    | The start of the aggregate time window for historical data. Unix timestamp in milliseconds.                    |
| to                                       | int    | The end of the aggregate time window for historical data. Unix timestamp in milliseconds.                      |

{% tabs %}
{% tab title="200: OK Success" %}

```javascript
[
    {
        "number": "17017595",
        "timestamp": "1681127183",
        "size": "379123",
        "gasLimit": "30000000",
        "gasUsed": "21721808",
        "totalDifficulty": "58750003716598352816469",
        "author": "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97"
    }
]
```

{% endtab %}

{% tab title="401: Unauthorized Unauthorized -- Invalid API Key" %}

```javascript
{
    "Unauthorized": "Invaild API Key"
}
```

{% endtab %}
{% endtabs %}

### **Copy & Paste Code**

{% tabs %}
{% tab title="Curl" %}

```bash
curl -H "apiKey: API KEY" https://api.abyiss.com/v1/blocks/ethereum
```

{% endtab %}

{% tab title="Python" %}

```python
import urllib.request
url = "https://api.abyiss.com/v1/blocks/ethereum?apiKey="
print(urllib.request.urlopen(url).read())
```

{% endtab %}

{% tab title="JavaScript" %}

```javascript
fetch("https://api.abyiss.com/v1/blocks/ethereum?apiKey=")
  .then(response => response.json())
  .then(data => console.log(data))
```

{% endtab %}

{% tab title="Node.js" %}

```javascript
require('axios')
  .get("https://api.abyiss.com/v1/blocks/ethereum?apiKey=")
  .then(response => console.log(response))
```

{% endtab %}

{% tab title="Ruby" %}

```ruby
require 'net/http'
uri = URI("https://api.abyiss.com/v1/blocks/ethereum?apiKey=")
puts Net::HTTP.get(uri)
```

{% endtab %}
{% endtabs %}

### **Response Object**

Example URL: <https://api.abyiss.com/v1/blocks/ethereum?apiKey=>

```json
[
    {
        "number": "17017595",
        "timestamp": "1681127183",
        "size": "379123",
        "gasLimit": "30000000",
        "gasUsed": "21721808",
        "totalDifficulty": "58750003716598352816469",
        "author": "0x4838b106fce9647bdf1e7877bf73ce8b0bad5f97"
    }
]
```

### Response Attributes

| Attribute Name  | Data Type | Description             |
| --------------- | --------- | ----------------------- |
| number          | string    | Blockchain block number |
| timestamp       | string    | Block number timestamp  |
| size            | string    | Block size              |
| gasLimit        | string    | Block gas limit         |
| gasUsed         | string    | Block gas used          |
| totalDifficulty | string    | Block total difficulty  |
| author          | string    | Block author            |




---

[Next Page](/llms-full.txt/1)

