# FX & Currency

> MyStocks-managed conversion for supported non-USD funding and withdrawals, plus execution and dividend FX. All wallets remain denominated in USD.

MyStocks keeps every partner and sub-account wallet in USD. For supported currencies, you can send a
local-currency funding or withdrawal amount and MyStocks converts it to the USD ledger amount using
the managed FX table. Your integration still owns the payment rail that collects or disburses the
local currency.

| Flow | Who handles FX? | What you provide | What MyStocks does |
| --- | --- | --- | --- |
| Funding (deposit) | MyStocks | Local `amount` + ISO `currency` | Converts with managed FX and credits the USD wallet |
| Equity trading | MyStocks | — | Applies the execution rate and settles in the local market currency |
| Dividends | MyStocks | — | Converts the declared dividend to USD and credits the sub-account wallet |
| Withdrawal | MyStocks | Local `amount` + ISO `currency` | Converts with managed FX and debits the USD wallet; partner completes payout |

## Funding and withdrawal conversion

Send the local amount in `amount` and its ISO 4217 code in `currency`. The response records the USD
ledger amount, rate, source, and timestamp. Use `GET /fx/rates` for the currently supported managed
currencies and rates.

```json
{
  "amount": 65000,
  "currency": "KES",
  "note": "mpesa_QHJ29SK"
}
```

The conversion metadata uses `fxSource: "MYSTOCKS_MANAGED_FX"`. You may instead send `amountUsd`
when the integration has already determined the exact USD ledger amount. The `fxRate` request field
is deprecated and retained only for legacy USD-ledger integrations; when supplied, it is identified
as `PARTNER_PROVIDED_LEGACY`. Do not use it for new integrations.

## Trading FX

When a BUY order executes on the NSE, MyStocks converts the USD amount to KES at the execution rate.
The `fillPrice` in the order response is expressed in the stock's native currency (for example, KES
for NSE). MyStocks debits the sub-account USD wallet using the applied rate.

<Callout type="warn">
  **FX risk.** Sub-account wallets are denominated in USD. Exchange-rate movements between funding and
  trade execution are borne by the end-user. MyStocks does not offer hedging; ensure your product
  disclosures reflect this.
</Callout>
