What is an Order?
An order represents a single swap transaction in Houdini’s system. Each order:- Has a unique
houdiniIdfor tracking - Progresses through numeric status codes (0-8)
- Contains swap details (tokens, amounts, addresses)
- Tracks execution progress and completion
Status Code Overview
Houdini API returns numeric status codes to represent the current state of an order:Order Status Flow
Standard Swap Flow
Private Swap Flow
Private swaps include an additionalANONYMIZING (3) status for multi-hop routing:
Status Definitions
Active States
0 - WAITING
0 - WAITING
Status Code:
0Description: Order created, waiting for user to send deposit.What’s Happening:- Deposit address generated and active
- Monitoring blockchain for incoming transaction
- Quote validity timer counting down
- Order will expire if no deposit received in time
- Display deposit address prominently
- Show exact amount to send
- Show correct network/chain
- Display expiration countdown
- Optionally show QR code for easy deposit
1 (CONFIRMING), 5 (EXPIRED)1 - CONFIRMING
1 - CONFIRMING
Status Code:
1Description: Deposit received, waiting for blockchain confirmations.What’s Happening:- Deposit transaction detected on-chain
- Waiting for required block confirmations
- Once confirmed, swap will begin execution
- Update UI to show deposit detected
- Display “Confirming deposit…” message
- Show confirmation progress if available
- Continue polling status
2 (EXCHANGING)2 - EXCHANGING
2 - EXCHANGING
Status Code:
2Description: Deposit confirmed, swap actively executing.What’s Happening:- DEX Routes: On-chain swap transaction being confirmed
- Standard Swaps: Single exchange processing
- Private Swaps: First hop of multi-hop route executing
- Show active progress indicator
- Poll status regularly
- Standard: 3-30 minutes
- Private: Moves to status
3(ANONYMIZING) - DEX: 30 seconds - 15 minutes
3 (ANONYMIZING - private only), 4 (COMPLETED), 6 (FAILED)3 - ANONYMIZING
3 - ANONYMIZING
Status Code:
3Description: Private swap routing through privacy layer (private swaps only).What’s Happening:- First exchange hop completed
- Routing through privacy layer (potentially via Monero)
- Second exchange hop executing
- Breaking transaction trail across multiple venues
- Show multi-hop progress indicator
- Continue polling
4 (COMPLETED), 6 (FAILED)Only Appears In: Private swaps with anonymous: trueTerminal States
4 - COMPLETED
4 - COMPLETED
Status Code:
4Description: Swap successfully completed, funds delivered to destination.What’s Happening:- Destination tokens sent to user’s
addressTo - Transaction confirmed on destination chain
- Order fully settled and complete
- Display success message prominently
- Show final amount received
- Provide destination transaction hash
- Link to blockchain explorer
- Stop status polling
5 - EXPIRED
5 - EXPIRED
Status Code:
5Description: Order expired before deposit was received.What’s Happening:- Quote validity window passed (typically 30 minutes)
- Deposit address deactivated
- No deposit transaction detected
- Order automatically expired by system
- Inform user order expired
- Explain they need to create a new order for a fresh quote
- Important: If user claims they sent funds to expired address, escalate to support immediately
- Stop status polling
6 - FAILED
6 - FAILED
Status Code:
6Description: Swap encountered an error and could not complete.What’s Happening:- CEX unavailable, insufficient liquidity, or technical error
- Deposit was received but swap execution failed
- System determining if refund is possible
- Error details available in response
- Display error message from
messagefield - Show refund status if available
- Provide customer support contact
7 - REFUNDED
7 - REFUNDED
Status Code:
7Description: Swap failed and original funds returned to user.What’s Happening:- Original deposit being returned to refund address
- Sent to
refundAddressprovided when creating order - May be partial refund if network fees deducted
- Refund transaction confirmed on-chain
- Display refund status
- Provide support contact for questions
- Stop status polling
8 - DELETED
8 - DELETED
Status Code:
8Description: Order was automatically deleted from the system.What’s Happening:- Order was automatically removed after a retention period
- This is a normal cleanup process for old orders
- No issues or problems with the order - it completed its lifecycle
- Historical data cleanup to maintain system performance
- Inform user that order data is no longer available
- This typically occurs for orders that are several hours old
- Stop status polling
InStatus and OutStatus Tracking (Optional)
All swap types (Standard, DEX, and Private) provide additional status fields to track detailed progress:Status Fields
status: Overall order status (0-8) - applies to all swap typesinStatus: Input leg status - tracks the progress of receiving and processing the depositoutStatus: Output leg status - only used in private swaps to track the second hop
Standard and DEX Swaps (Single Hop)
For standard CEX swaps and DEX swaps, onlyinStatus is used to track progress:
Private Swaps (Multi-Hop)
Private swaps use bothinStatus and outStatus to track each hop separately:
Key Difference: Standard and DEX swaps only use
inStatus (single hop), while private swaps use both inStatus and outStatus (multi-hop) to track each exchange leg separately.