Create Order

Create a new buy or sell order

POST
texttext
/api/v2/orders/create

Creates a new order for buying (on-ramp) or selling (off-ramp) cryptocurrency.

Request Body

partnerOrderIdstring
Your reference ID for this order
productsAvailedstringrequired
BUY | SELL | NFT
networkstringrequired
Blockchain network
cryptoCurrencystringrequired
Cryptocurrency code
fiatCurrencystringrequired
Fiat currency code
fiatAmountnumber
Fiat amount (for BUY)
cryptoAmountnumber
Crypto amount (for SELL)
walletAddressstringrequired
Destination wallet address (BUY) / sender wallet (SELL)
userIdstring
OZZOBiT user ID
partnerCustomerIdstring
Your internal user ID
paymentMethodstring
Payment method ID

Response Schema

idstring
OZZOBiT order ID
partnerOrderIdstring
Your reference ID
statusstring
CREATED | AWAITING_PAYMENT
fiatAmountnumber
Fiat amount
cryptoAmountnumber
Crypto amount
walletAddressstring
Wallet address
depositAddressstring | null
Crypto deposit address (for SELL)
expiresAtstring
ISO 8601 expiry timestamp
paymentUrlstring | null
URL for user to complete payment
createdAtstring
ISO 8601 creation timestamp

Example Request

bashbash
curl -X POST "https://OZZOBiT.com/api/api/v2/orders/create" \
  -H "Authorization: Bearer YOUR_ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "partnerOrderId": "ORDER-1705312345",
    "productsAvailed": "BUY",
    "network": "ethereum",
    "cryptoCurrency": "ETH",
    "fiatCurrency": "USD",
    "fiatAmount": 100,
    "walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f8bD21",
    "partnerCustomerId": "user_456"
  }'

Example Response

jsonjson
{
  "id": "OZZOBiT-order-abc123",
  "partnerOrderId": "ORDER-1705312345",
  "status": "AWAITING_PAYMENT_FROM_USER",
  "productsAvailed": "BUY",
  "network": "ethereum",
  "cryptoCurrency": "ETH",
  "fiatCurrency": "USD",
  "fiatAmount": 100.00,
  "cryptoAmount": 0.045231,
  "walletAddress": "0x742d35Cc6634C0532925a3b844Bc9e7595f8bD21",
  "depositAddress": null,
  "expiresAt": "2024-01-15T11:30:00Z",
  "paymentUrl": "https://OZZOBiT.com/pay/abc123",
  "createdAt": "2024-01-15T10:30:00Z"
}