GuidesAPI ReferenceChangelog
API Reference

Create Auto-Conversion Rule

Create an Auto-Conversion Rule for fiat->crypto, crypto->fiat, or crypto->crypto conversions.

Supported Assets:

  • USD, USDC, USDT, PYUSD, RLUSD, USDG, USDP, EURC, MXNB
    Supported Networks:
  • Fiat deposit networks: US_FEDWIRE, SWIFT
  • Crypto networks: ETHEREUM, POLYGON, BASE, ARBITRUM, AVALANCHE, BNBCHAIN, SOLANA, TRON

Validation Rules:

  • Supported pairs: fiat->crypto, crypto->fiat, and crypto->crypto; fiat->fiat is NOT supported
  • Idempotency-Key header is required and must be a valid UUID v4
  • Source network must match asset type (fiat asset requires fiat network, crypto asset requires crypto network)
  • For crypto withdrawal destination: network is required when wallet_address is provided
  • For fiat destination: network will be omitted

Withdrawal Configuration:

  • Fiat-to-Crypto or Crypto->Crypto with withdrawal: provide wallet_address (external crypto wallet address)
  • Crypto-to-Fiat with withdrawal: provide external_account_id (bank account ID from external-accounts API)
  • Conversion-only (no withdrawal): omit both fields, converted funds remain in customer's account

Idempotency & Webhook Behavior:

  • This endpoint creates resources asynchronously. The webhook notification may arrive before the HTTP response returns.
  • Use the Idempotency-Key to query the resource status via webhook response, enabling proper idempotency control.
  • Recommended flow: Instead of waiting for the HTTP response and then the webhook, clients can use the webhook arrival as the completion signal and query by Idempotency-Key to verify the result.
  • This approach prevents "dangling wait" scenarios where clients unnecessarily wait for the HTTP response when the webhook has already confirmed the outcome.

Response & Status:

  • The response will have status=PENDING and source_deposit_info=null because deposit info is being prepared asynchronously.
  • Once deposit info is ready, the status will transition to ACTIVE and source_deposit_info will contain bank deposit details or crypto wallet address.
  • Use the retrieve endpoint or webhook to get the full details when the rule becomes ACTIVE.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Path Params
string
required

Customer ID (UUID format)

Body Params

Request body for creating a new Auto-Conversion Rule.

source
object
required

Source asset and network configuration.

  • For fiat source (deposit): use fiat network (US_FEDWIRE, SWIFT)
  • For crypto source: use crypto network (ETHEREUM, POLYGON, etc.)
destination
object
required

Destination asset and optional withdrawal configuration.

  • For crypto withdrawal destination: network is required when wallet_address is provided
  • For fiat destination: network should be omitted
  • wallet_address: for fiat->crypto or crypto->crypto withdrawal to external wallet
  • external_account_id: for crypto->fiat withdrawal to bank account
Headers
string
required

Required. UUID v4 for idempotent request. Same key returns existing Auto-Conversion Rule if already created.

Responses

Language
Credentials
Bearer
OneMoney-HMAC-SHA256
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json