How funds move
| Flow | How |
|---|---|
| External โ funding | Deposit address route configured to stop in Funding |
| External โ trading | Deposit address route configured to continue to Trading |
| Funding โ funding | On-chain Funding Account transfer |
| Funding โ trading | On-chain TradingGateway.deposit via chain (not ConnectRPC) |
| Funding โ external | On-chain FundingAccount.withdrawToChain plus Zipper fee quote |
| Trading โ funding | client.withdraw.create_to_funding (signed intent) |
| Trading โ external | client.withdraw.create_to_external_chain |
| Trading โ trading | client.internal_transfers.create |
Also: Zipper config (client.zipper), lifecycle reads/streams (client.lifecycle), address book
for destinations.
Product overview: Funds & Transfers.
Deposit addresses
addr = await client.deposit.create_address(chain_id=1)
listed = await client.deposit.list_addresses(chain_id=1)See Deposit.
Trading withdraws
API-key bots pass a precomputed payload_signature (no browser wallet signer on this SDK):
from polyester import new_trading_withdraw_idempotency_key, new_trading_withdraw_nonce
idempotency_key = new_trading_withdraw_idempotency_key()
nonce = new_trading_withdraw_nonce()
# Persist both values and use them when producing signature_bytes.
result = await client.withdraw.create_to_funding(
asset_id=2,
quantity="100.00",
payload_signature=signature_bytes,
idempotency_key=idempotency_key,
nonce=nonce,
)Reuse the same idempotency key, nonce, and signed payload on retry. Details: Withdrawals.
Internal transfers
await client.internal_transfers.create(
asset_id=2,
quantity="10",
idempotency_key="xfer-1",
destination_subaccount_id="123",
)On-chain Funding helpers
from polyester.chain import (
POLYESTER_TESTNET_ENVIRONMENT,
PolyesterSmartAccount,
encode_trading_gateway_deposit,
)
account = PolyesterSmartAccount(owner_private_key="0x...") # your EOA
deposit = encode_trading_gateway_deposit(
trading_gateway=POLYESTER_TESTNET_ENVIRONMENT.contracts.trading_gateway_address,
u_asset_id="0x...",
quantity_scaled=10**18,
)
account.send_calls([deposit])Full surface: Chain helpers.
Security
High-risk money movement may require additional account controls. See Withdrawals & transfers security.
Related Topics
Authentication Configure Ed25519 API keys, Account ID, and env-based wiring for bots. Market data Read candles, public trades, order books, and market overview, no credentials required. Trading Place, modify, cancel, and batch spot orders; use triggers and risk attachments. Streaming Subscribe to public and private WebSocket Protobuf channels with async iterators, handshake-before-return, and fail-closed overflow. Accounts & balances Funding vs trading balances, holds, subaccounts, policies, and transfer history. Server-side usage Long-running bots, process lifecycle, catalogs, and configuration tips. Error handling Classify failures, retry safely with idempotency keys, and handle realtime overflow. Production trading operations Operate, test, troubleshoot, and upgrade an automated Python trading system safely.