Skip to main content

Installation

Or from source:

Requirements

  • Python 3.10+
  • eth-account (EIP-712 signing)
  • requests (HTTP)
  • websockets (real-time data)

Connect and Authenticate

Your private key never leaves your machine. It’s only used locally to sign an EIP-712 message that proves wallet ownership.

How Auth Works

Blink uses two auth levels (same as Polymarket): Level 1 — EIP-712 (one-time setup) Your wallet signs a typed data message to create API credentials. This happens once when you call create_or_derive_api_creds(). Level 2 — HMAC-SHA256 (every request) All trading requests are signed with HMAC. The SDK handles this automatically after credentials are created.

Configuration

Error Handling

The SDK raises BlinkApiError for HTTP errors and BlinkAuthError for authentication failures:
The SDK automatically retries on 5xx errors (3 attempts with exponential backoff).

Testnet Faucet

Get free USDC on Base Sepolia:

What’s Next

Trading

Place orders, batch operations, order types

WebSocket Streams

Real-time orderbook, fills, price ticks