revolut-trading

📁 jasonviipers/revolut-x-crypto 📅 9 days ago
10
总安装量
10
周安装量
#29035
全站排名
安装命令
npx skills add https://github.com/jasonviipers/revolut-x-crypto --skill revolut-trading

Agent 安装分布

gemini-cli 10
github-copilot 10
codex 10
kimi-cli 10
amp 10
opencode 10

Skill 文档

Revolut Trading Skill

This skill provides tools and documentation for interacting with the Revolut X Crypto Exchange API.

Capabilities

  • Authentication: Securely authenticate using Ed25519 key pairs.
  • Market Data: Fetch real-time market data including order books, trades, and candles.
  • Trading: Place, cancel, and manage orders.
  • Account Management: Retrieve account balances and transaction history.

Quick Start

1. Authentication

To use the API, you need an API Key and a private key. See 00_api_overview_and_authentication.md for details on generating keys.

2. Using the Python Client

A Python client wrapper is provided in scripts/revolut_client.py. This script handles authentication and request signing for you.

Example Usage:

from scripts.revolut_client import RevolutClient

# Initialize the client
client = RevolutClient(
    private_key_path="path/to/private_key.pem",
    api_key="your_api_key"
)

# Get all currencies
currencies = client.get_currencies()
print(currencies)

# Get account balances
balances = client.get_balances()
print(balances)

# Place a limit order
order = client.place_order(
    client_order_id="unique_id_123",
    symbol="BTC-USD",
    side="buy",
    order_configuration={
        "limit": {
            "price": "50000",
            "base_size": "0.001"
        }
    }
)
print(order)

API Reference

For detailed API documentation, refer to the following files:

General

Market Data

Account & Trading

Common Workflows

Fetching Market Data

To analyze the market before trading, use the Market Data endpoints.

  • Use Get All Tickers for a quick overview of prices.
  • Use Get Order Book to see depth and liquidity.
  • Use Get Historical OHLCV Candles for technical analysis.

Placing an Order

  1. Check Balance: Ensure you have sufficient funds using Get All Balances.
  2. Determine Price: Use Market Data endpoints to decide on a price.
  3. Place Order: Use Place Order with a unique client_order_id.
  4. Monitor Order: Use Get Order By ID or Get Active Orders to track status.

Error Handling

The API returns standard HTTP status codes.

  • 400 Bad Request: Check your parameters.
  • 401 Unauthorized: Check your API key and signature.
  • 429 Too Many Requests: You are being rate-limited. Back off and retry.