---
title: "Encrypt and save one exchange connection"
method: PUT
path: "/trading/connections/{platform}"
tags: ["Trading"]
---

# Encrypt and save one exchange connection

`PUT /trading/connections/{platform}`

## Request

- Base URL: `https://foresea.ink` (the document declares no server; this is the origin it was published from)
- URL: `https://foresea.ink/trading/connections/{platform}`
- Auth: none declared

Validate and store one account connection with server-side encryption.

## Path parameters

- `platform` string, required

## Request body

- TradingConnectionRequest: One-time encrypted account-connection request.
  - `venue_credentials` VenueCredentials, required: Credentials received only by the authenticated connection endpoint. These values are accepted once over TLS, encrypted server-side, and never returned to the browser. They are intentionally rejected on order-preview and order-submission requests so the public UI cannot fall back to a browser-held secret flow.
    - `kalshi_api_key_id` string, nullable
    - `kalshi_private_key` string, nullable: RSA private key PEM.
    - `kalshi_base_url` string, nullable
    - `polymarket_private_key` string, nullable: Wallet private key.
    - `polymarket_api_key` string, nullable
    - `polymarket_api_secret` string, nullable
    - `polymarket_api_passphrase` string, nullable
    - `polymarket_clob_host` string, nullable
    - `polymarket_chain_id` integer, nullable
    - `polymarket_signature_type` integer, nullable
    - `polymarket_funder_address` string, nullable

## Response `200`

Successful Response

- TradingConnectionStatus
  - `platform` string, required
  - `connected` boolean, required
  - `updated_at` string, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/foresea/apis/foresea-intelligence-api.md) · [All operations](https://skmtc.dev/foresea/apis/foresea-intelligence-api/llms.txt) · [OpenAPI document](https://skmtc.dev/foresea/apis/foresea-intelligence-api/revisions/b03e49f4385d?raw)
