Skip to main content
Build on InkySwap: Our APIs provide programmatic access to token data, trading functionality, and platform features.
API Under Active Development: These APIs are currently being developed and may contain bugs or outdated information. If you encounter any errors, mistakes, or outdated documentation, please notify @emperoroftheink on Telegram for assistance and updates.

Introduction

The InkySwap ecosystem provides two distinct API services for different functionalities:

InkyPump API

Base URL: https://inkypump.comToken discovery and social features:
  • Token information and listings
  • Emperor of the INK (EOTI) data
  • King of the INK (KOTI) data
  • Chat messages
  • Leaderboards
  • Image uploads

InkySwap API

Base URL: https://inkyswap.comDEX and trading functionality:
  • Liquidity pairs
  • Swap quotes
  • Token lists
  • Price data

Authentication

All API endpoints are publicly accessible without authentication. However, rate limits apply to prevent abuse.

Rate Limiting

Our APIs implement progressive rate limiting to ensure fair usage:
  • Standard Endpoints
  • Computational Endpoints
  • Upload Endpoints
30 requests per minute per IP addressApplies to:
  • Token queries
  • Price checks
  • Pair listings
  • KOTI/EOTI status

Rate Limit Headers

All responses include rate limit information:
X-RateLimit-Limit: 30
X-RateLimit-Remaining: 28
X-RateLimit-Reset: 1640995200

Rate Limit Errors

When rate limited, you’ll receive:
{
  "error": "Too many requests. Please try again later.",
  "retryAfter": 60
}

Response Format

All API responses follow a consistent JSON structure:

Success Response

{
  "data": {
    // Response data
  },
  "success": true
}

Error Response

{
  "error": "Error message",
  "details": "Additional error information",
  "status": 400
}

Common HTTP Status Codes

Request successful, data returned
Invalid parameters or malformed request
Requested resource doesn’t exist
Rate limit exceeded, retry after cooldown
Server error, please retry or report if persistent

Data Types

Addresses

All Ethereum addresses should be:
  • 42 characters long (including 0x prefix)
  • Checksummed when possible
  • Lowercase accepted for queries
Example: 0x1234567890abcdef1234567890abcdef12345678

Token Amounts

All token amounts are returned as strings in their smallest unit:
  • ETH amounts in wei (1 ETH = 10^18 wei)
  • Token amounts in their base unit based on decimals
Example: "1000000000000000000" = 1 ETH

Timestamps

Timestamps use ISO 8601 format: Example: "2024-01-15T10:30:00Z"

Best Practices

Implement Exponential Backoff

When encountering rate limits, wait progressively longer between retries:
const delay = Math.min(1000 * Math.pow(2, retryCount), 30000);

Cache Responses

Cache frequently accessed data locally:
  • Token metadata (changes infrequently)
  • Historical data (immutable)
  • Rate limit expensive operations

Use Batch Endpoints

When available, use batch endpoints to reduce requests:
  • Fetch multiple tokens in one call
  • Query multiple pairs simultaneously

Handle Errors Gracefully

Implement proper error handling:
  • Parse error messages
  • Provide fallback behavior
  • Log errors for debugging

CORS Support

Both APIs support Cross-Origin Resource Sharing (CORS) for browser-based applications:
const response = await fetch('https://inkypump.com/api/tokens', {
  method: 'GET',
  headers: {
    'Content-Type': 'application/json',
  }
});

WebSocket Support

WebSocket connections are not currently available. Use polling with appropriate intervals for real-time updates.

SDK and Libraries

Official SDKs are in development. For now, use standard HTTP libraries in your preferred language.

JavaScript/TypeScript

// Using fetch API
const response = await fetch('https://inkypump.com/api/token?address=0x...');
const token = await response.json();

// Using axios
import axios from 'axios';
const { data } = await axios.get('https://inkypump.com/api/token', {
  params: { address: '0x...' }
});

Python

import requests

response = requests.get(
    'https://inkypump.com/api/token',
    params={'address': '0x...'}
)
token = response.json()

Support

Documentation

Browse our comprehensive API documentation for detailed endpoint information

Community

Join our Telegram for developer support
I