Swipe Icon Logo
Swipe Logo

Swipe Developer Docs

Everything you need to build, trade, and scale with Swipe's AI API

Getting Started

Last updated: May 10, 2025

Welcome to the Swipe API documentation. This guide will help you get started with integrating Swipe's AI-powered trading capabilities into your applications.

Swipe provides a RESTful API that allows you to access GPT-powered trading signals, execute trades, and monitor performance in real-time. Our API is designed to be simple, intuitive, and powerful.

Before you begin, you'll need to create an account and obtain an API key. You can sign up for a free account at dashboard.swipe.trade.

Base URL

All API requests should be made to the following base URL:

https://api.swipe.trade/v1

Making Your First Request

Here's a simple example of how to fetch a trading signal for ETH/USDT:

curl https://api.swipe.trade/v1/signal \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{ "pair": "ETH/USDT" }'

Authentication

Last updated: May 10, 2025

Swipe uses Bearer tokens for scoped, role-based access. Include your API key in the Authorization header.

All API requests must include your API key in the Authorization header. Your API key is a sensitive piece of information that grants access to your Swipe account and trading capabilities.

curl https://api.swipe.trade/v1/signal \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{ "pair": "BTC/USDT" }'

Security Note

Never share your API key publicly. Use scoped tokens for production environments and rotate your keys regularly.

API Key Management

You can manage your API keys in the Swipe dashboard. We recommend creating separate API keys for different environments (development, staging, production) and with different scopes.

Signal API

Last updated: May 10, 2025

The Signal API allows you to fetch AI-generated trading signals based on market conditions and your chosen strategy.

Signals are generated using our proprietary GPT models trained on vast amounts of market data. Each signal includes a recommended action (buy, sell, hold), confidence level, and supporting data.

Request Parameters

ParameterTypeRequiredDescription
pairstringYesTrading pair (e.g., "BTC/USDT")
strategystringNoStrategy name (default: "momentum")
timeframestringNoTimeframe (e.g., "1h", "4h", "1d")

Response Format

{
  "signal": "buy",
  "confidence": 0.87,
  "pair": "BTC/USDT",
  "price": 42568.75,
  "timestamp": "2023-06-15T14:32:10Z",
  "strategy": "momentum",
  "reasoning": "Strong bullish momentum with increasing volume and positive MACD crossover",
  "suggested_entry": 42500,
  "suggested_stop_loss": 41800,
  "suggested_take_profit": 44000
}

Trade Execution

Last updated: May 10, 2025

The Trade Execution API allows you to submit trade orders to connected exchanges or trading terminals.

You can execute trades based on signals or your own custom logic. Our API supports market orders, limit orders, and stop orders.

Execute a Trade

To execute a trade, send a POST request to the /execute endpoint:

curl https://api.swipe.trade/v1/execute \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "pair": "ETH/USDT",
    "side": "buy",
    "type": "market",
    "amount": 0.5,
    "exchange": "binance"
  }'

Request Parameters

ParameterTypeRequiredDescription
pairstringYesTrading pair (e.g., "ETH/USDT")
sidestringYes"buy" or "sell"
typestringYes"market", "limit", or "stop"
amountnumberYesAmount to trade
pricenumberNo*Required for limit and stop orders
exchangestringYesExchange name (e.g., "binance")

Error Handling

Last updated: May 10, 2025

The Swipe API uses conventional HTTP response codes to indicate the success or failure of an API request.

In general, codes in the 2xx range indicate success, codes in the 4xx range indicate an error that resulted from the provided information (e.g., a required parameter was missing), and codes in the 5xx range indicate an error with our servers.

Error Responses

CodeMessageDescription
400Bad RequestThe request was malformed or missing required parameters
401UnauthorizedInvalid or missing API key
403ForbiddenThe API key doesn't have permission to perform the request
404Not FoundThe requested resource doesn't exist
429Rate Limit ExceededToo many requests per minute
500Server ErrorInternal Swipe API error

Error Response Format

All error responses include a JSON object with an error message and additional details:

{
  "error": {
    "code": 401,
    "message": "Unauthorized",
    "details": "Invalid API key provided"
  }
}

Rate Limits

Last updated: May 10, 2025

The Swipe API implements rate limiting to protect our infrastructure and ensure fair usage across all users.

Rate limits vary based on your subscription plan. If you exceed your rate limit, you'll receive a 429 Too Many Requests response.

Rate Limit Headers

All API responses include headers that provide information about your current rate limit status:

HeaderDescription
X-RateLimit-LimitThe maximum number of requests you're permitted to make per minute
X-RateLimit-RemainingThe number of requests remaining in the current rate limit window
X-RateLimit-ResetThe time at which the current rate limit window resets (UTC epoch seconds)

Rate Limit By Plan

PlanRequests per MinuteRequests per Day
Free101,000
Pro60100,000
Enterprise600Unlimited

Changelog

Last updated: May 10, 2025

Stay up to date with the latest changes and improvements to the Swipe API.

v1.3.0May 10, 2025

  • Added support for custom strategy parameters
  • Improved signal accuracy for volatile market conditions
  • Added new endpoint for historical signal performance
  • Fixed bug in trade execution for certain exchanges

v1.2.0March 15, 2025

  • Added WebSocket support for real-time signal updates
  • Introduced new AI models for improved signal accuracy
  • Enhanced rate limiting with more granular controls
  • Added support for stop-limit orders

v1.1.0February 8, 2025

  • Added support for multiple exchanges
  • Introduced new trading strategies
  • Improved error handling and reporting
  • Enhanced security with API key scoping

v1.0.0January 12, 2025

  • Initial release of the Swipe API
  • Basic signal generation and trade execution
  • Support for major cryptocurrency pairs
  • Integration with Binance and Coinbase

Need more help?

Visit the Help Center or join our developer Discord