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.com
Token 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.com
DEX 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:Rate Limit Errors
When rate limited, you’ll receive:Response Format
All API responses follow a consistent JSON structure:Success Response
Error Response
Common HTTP Status Codes
200 OK
200 OK
Request successful, data returned
400 Bad Request
400 Bad Request
Invalid parameters or malformed request
404 Not Found
404 Not Found
Requested resource doesn’t exist
429 Too Many Requests
429 Too Many Requests
Rate limit exceeded, retry after cooldown
500 Internal Server Error
500 Internal Server Error
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
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
"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:
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: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
Python
Support
Documentation
Browse our comprehensive API documentation for detailed endpoint information
Community
Join our Telegram for developer support