Variational Docs
HomeDiscordTwitterBlog
  • Getting Started
    • About Variational
    • Core Contributors
    • Key Concepts
      • P2P Trading Protocol vs DEX
      • Trading via RFQ
      • Settlement Pools
      • Margin
      • Slippage
      • Leverage
      • Liquidation
      • Mark, Index, and Quoted Prices
      • Open Interest & Funding Rates
      • Fully Diluted Valuation (FDV)
      • Fees
      • Market vs. Limit Orders
      • Take Profit & Stop Loss
    • Roadmap
    • $VAR Token
    • Official Links
    • Media Kit
    • FAQ
    • Getting Help (Support)
    • Additional Resources
  • Variational Omni
    • About Omni
      • The Omni Liquidity Provider (OLP)
      • Risk Limits
      • Listings
    • Getting Started with Omni
  • 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
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