Abyiss
HomeAPI KeyContact Us
  • Free API Key
  • Introduction
    • Welcome
    • Getting Started
    • Reading Documentation
    • Client Libraries
    • API Architecture
      • API Keys - Authentication
      • API Server URL
      • Requests & Error Codes
      • Rate Limits
  • Octane API
    • Introduction
    • Integration Guides
      • Crypto Off Ramp APIs - Business Guide
    • References
      • Transaction Types
      • Payment Methods
      • Transaction Fees
      • Partner Fees
    • APIs
      • Transactions
      • Assets
      • Payment Methods
        • Bank Accounts
        • Wallets
      • Subaccounts
      • KYC (Know Your Customer)
  • Crypto API
    • Introduction
    • References
      • Supported Exchanges
      • Historical Data
      • Pagination
      • Return Types
    • REST APIs
      • Exchanges
      • Exchanges Count
      • Exchange Data
      • Exchange Status
      • Exchange Markets
      • Market Details
      • Current Price
      • Aggregates (Bars)
      • Last Aggregate
      • Trades
      • Last Trade
      • Snapshot
      • Order Books
      • Liquidity
      • Whales
    • WebSockets
      • Request Access
  • Blockchain API
    • Introduction
    • References
      • Supported Exchanges
      • Historical Data
      • Pagination
      • Query Parameters
      • Error Handling
    • REST APIs
      • Exchanges
      • Blockchains
      • Blocks
      • Exchange Data
      • Tokens
      • Token Data
      • Token Aggregates (Bars)
      • Token Trades
      • Pools
      • Pool Data
      • Pool Aggregates (Bars)
      • Pool Trades
      • Token Search
    • WebSockets
      • Request Access
  • Alerts API
    • Request Access
  • Changes
    • Changelog
    • Upcoming Changes
  • Resources
    • Glossary
    • Social Media
    • Legal Guide
    • White Paper
    • Deprecated
      • Crypto APIs /v1 - REST APIs
        • Exchanges
        • Exchanges Count
        • Exchange Data
        • Exchange Status
        • Exchange Markets
        • Market Details
        • Current Price
        • Aggregates (Bars)
        • Last Aggregate
        • Trades
        • Last Trade
        • Snapshot
        • Order Books
        • Liquidity
        • Whales
      • Blockchain APIs /v1 - REST APIs
        • Exchanges
        • Blockchains
        • Blocks
        • Exchange Data
        • Tokens
        • Token Data
        • Token Aggregates (Bars)
        • Token Trades
        • Pools
        • Pool Data
        • Pool Aggregates (Bars)
        • Pool Trades
        • Token Search
Powered by GitBook
On this page
  • Rate Limit for REST API
  • Higher Rate Limits
  • How It Works
  • Example

Was this helpful?

  1. Introduction
  2. API Architecture

Rate Limits

How rate limits work with the Abyiss API.

PreviousRequests & Error CodesNextIntroduction

Last updated 3 months ago

Was this helpful?

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 . 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

Action
Time
Tokens
Notes

Initial State

0.0

3.0

New TokenBucket is initialized to max capacity (burst)

Request 1

0.5

2.0

First fill the TokenBucket, then remove a token. Because we are at max capacity, just subtract 1 token from 3

Request 2

0.8

1.3

Fill the TokenBucket to 2.3 (min(3, (2 + (.8 - .5) * 1.0)) = min(3, 2.3) = 2.3), then subtract 1

Request 3

0.9

0.4

Fill the TokenBucket to 1.4 (min(3, (1.3 + (.9 - .8) * 1.0)) = min(3, 1.4) = 1.4), then subtract 1

Request 4

1.0

0.5

Fill the TokenBucket to 0.5 (min(3, (.4 + (1.0 - .9) * 1.0)) = min(3, 0.5) = 0.5). Ratelimit because we don't have enough tokens available

Request 5

1.4

0.9

Fill the TokenBucket to 0.9 (min(3, (0.5 + (1.4 - 1.0) * 1.0)) = min(3, 0.9) = 0.9). Ratelimit because we don't have enough tokens available

Request 6

1.8

0.3

Fill the TokenBucket to 1.3 (min(3, (0.9 + (1.8 - 1.4) * 1.0)) = min(3, 1.3) = 1.3), then remove 1

Request 7

5.0

2.0

Fill the TokenBucket to 3.0 (min(3, (0.3 + (5.0 - 1.8) * 1.0)) = min(3, 3.5) = 3) since we would "overflow" with our calculations. Then subtract 1 token

support@abyiss.com