Variational Docs
HomeDiscordTwitterBlog
  • Variational Protocol
    • About Variational
    • Peer-to-peer vs DEX
    • Roadmap
    • Key Concepts
      • Trading via RFQ
      • Settlement Pools
      • Margin
      • Slippage
      • Leverage
      • Liquidation
      • Mark price vs index price vs quote price
      • Open Interest & Funding Rates
      • Fully Diluted Valuation (FDV)
      • Fees
      • Market vs. Limit Orders
      • Take Profit & Stop Loss
    • $VAR Token
    • Media Kit
    • Official Links
    • FAQ
    • Getting Help (Support)
  • Variational Omni
    • About Omni
    • Getting Started with Omni
    • Getting Started With Omni (Testnet)
    • Omni Liquidity Provider (OLP)
    • Listings
    • Risk Limits
  • Automatic Deleveraging | Counterparty Liquidation
  • Variational Pro
    • About Pro
  • Technical Documentation
    • Technical Overview
      • Authentication
      • Deposits
      • Withdrawals
      • Trades
    • Derivative Specifications
      • Perpetual Futures
      • Settlement
    • API
      • SDKs
      • Quickstart and Tutorials
        • API Trading Prerequisites and Setup
        • Settlement Pool Deposit Tutorial
        • Taker (RFQ Submitter) Tutorial
        • Maker (RFQ Responder) Tutorial
      • Endpoints
      • Data Models
      • Headers
      • Pagination
      • Rate Limits
      • Authentication
    • Contracts and ABIs
    • Security and Audits
    • Partners
  • Legal
    • Terms of Service
    • Privacy Policy
    • Restricted Persons
  • ARCHIVE
    • Testnet Trading Competition #1 Leaderboard
    • Testnet Trading Competition #2 Leaderboard
    • Testnet Trading Competition #3 Leaderboard
Powered by GitBook
On this page
  • Read-only Quickstart (Testnet)
  • 1. Create API credentials
  • 2. Install the Python SDK
  • 3. Make some requests!
  • 4. Explore
  1. Technical Documentation

API

Documentation for the Variational public API

PreviousSettlementNextSDKs

Last updated 4 months ago

API key generation is currently unavailable. Please contact our team via hello@variational.io if you are interested in using the API service.

Read-only Quickstart (Testnet)

1. Create API credentials

Navigate to the API settings page at

Add a descriptive label, create your key, and make sure to save the secret as it's only displayed once.

2. Install the Python SDK

pip install variational

3. Make some requests!

from variational import Client, TESTNET
from pprint import pprint

# FIXME: load from environment variables
API_KEY = "your-api-key"
API_SECRET = "your-api-secret"

client = Client(API_KEY, API_SECRET, base_url=TESTNET)
summary = client.get_portfolio_summary().result
pprint(summary)

Client parameters:

  • key: str (required) — your API key

  • secret: str (required) — your API secret

  • base_url: str (optional) — prefix of Variational API endpoints

  • request_timeout: float (default=None) — timeout for individual HTTP requests

  • retry_rate_limits: bool (default=True) — enables automatic retry on HTTP 429 errors

You can choose one of the two base URLs:

MAINNET = "https://api.variational.io/v1"
TESTNET = "https://api.testnet.variational.io/v1"

4. Explore

Note: if you have a lot of trades in the account, it might make multiple requests and significant amount of time to fetch all of them. See for potential debugging steps.

Visit the to learn which API calls are supported.

Read about the mechanism used by the Variational API.

Learn how and are applied to your calls.

Pagination
Endpoint Reference
Pagination
Rate Limits
Authentication
https://pro.testnet.variational.io/app/settings