# CoinPool API ## Docs - [Create escrow wallet record (admin)](https://docs.crypto.westminister.tech/api-reference/escrow-wallets/create-escrow-wallet-record-admin.md) - [Get escrow wallet by ID](https://docs.crypto.westminister.tech/api-reference/escrow-wallets/get-escrow-wallet-by-id.md) - [List escrow wallets](https://docs.crypto.westminister.tech/api-reference/escrow-wallets/list-escrow-wallets.md) - [List escrow wallets by network](https://docs.crypto.westminister.tech/api-reference/escrow-wallets/list-escrow-wallets-by-network.md) - [Create master merchant and sub-merchants in one call](https://docs.crypto.westminister.tech/api-reference/merchants/create-master-merchant-and-sub-merchants-in-one-call.md): Creates a master merchant and zero or more sub-merchants, each with default Ethereum and TRON wallets. - [Create master merchant (vendor) with default wallets](https://docs.crypto.westminister.tech/api-reference/merchants/create-master-merchant-vendor-with-default-wallets.md): Creates a new **master merchant** (vendor user) and provisions default Ethereum and TRON wallets for platform use. - [Create sub-merchant under a master merchant](https://docs.crypto.westminister.tech/api-reference/merchants/create-sub-merchant-under-a-master-merchant.md): Creates a **sub-merchant** whose `parent_vendor_id` points to the given master merchant. - [Delete merchant or sub-merchant (soft delete)](https://docs.crypto.westminister.tech/api-reference/merchants/delete-merchant-or-sub-merchant-soft-delete.md): Soft deletes the merchant user (marks deleted_at and deactivates account). - [Get merchant with sub-merchants and wallets](https://docs.crypto.westminister.tech/api-reference/merchants/get-merchant-with-sub-merchants-and-wallets.md): Returns a master merchant, its wallets, and all sub-merchants (with their wallets). - [List master merchants (vendors)](https://docs.crypto.westminister.tech/api-reference/merchants/list-master-merchants-vendors.md): Returns paginated list of vendors with no parent_vendor_id (master merchants). - [Update merchant or sub-merchant](https://docs.crypto.westminister.tech/api-reference/merchants/update-merchant-or-sub-merchant.md): Updates basic profile, KYC status, and active flag for a merchant or sub-merchant. - [Vendor aggregate USDT liquidity view](https://docs.crypto.westminister.tech/api-reference/merchants/vendor-aggregate-usdt-liquidity-view.md) - [Confirm TRON multisig proposal (add signature)](https://docs.crypto.westminister.tech/api-reference/multisig/confirm-tron-multisig-proposal-add-signature.md): Provide either `signature` (hex from signing `rawDataHex`) or `signer_private_key` (non-production only). Appends signature until threshold, then broadcasts. - [Get multisig proposal status](https://docs.crypto.westminister.tech/api-reference/multisig/get-multisig-proposal-status.md): TRON proposals include `tron_unsigned_tx` with `rawDataHex` for signing; Ethereum responses follow your registered multisig configuration. - [Register multisig wallet (vendor/admin)](https://docs.crypto.westminister.tech/api-reference/multisig/register-multisig-wallet-vendoradmin.md): Registers a multisig wallet for the authenticated vendor or admin. Required fields depend on whether the wallet is platform-provisioned or self-managed; see the Multisig guide. - [Count all offers](https://docs.crypto.westminister.tech/api-reference/offers/count-all-offers.md) - [Count offers by status](https://docs.crypto.westminister.tech/api-reference/offers/count-offers-by-status.md) - [Count offers by type](https://docs.crypto.westminister.tech/api-reference/offers/count-offers-by-type.md) - [Count offers by vendor](https://docs.crypto.westminister.tech/api-reference/offers/count-offers-by-vendor.md) - [Create offer (on-ramp or off-ramp)](https://docs.crypto.westminister.tech/api-reference/offers/create-offer-on-ramp-or-off-ramp.md): Creates an offer for the authenticated actor context. - `admin` can create offers for any `vendor_id` - `customer`, `vendor`, and `subvendor` can create offers only for themselves (`vendor_id` must match authenticated user id) - `max_order` must be less than or equal to `available_amount` - [Delete own offer](https://docs.crypto.westminister.tech/api-reference/offers/delete-own-offer.md): Soft-deletes an offer only when it belongs to the authenticated user. - [Get offer by ID](https://docs.crypto.westminister.tech/api-reference/offers/get-offer-by-id.md): Returns an offer only when it belongs to the authenticated user. - [List active offers](https://docs.crypto.westminister.tech/api-reference/offers/list-active-offers.md) - [List available offers by asset and type](https://docs.crypto.westminister.tech/api-reference/offers/list-available-offers-by-asset-and-type.md) - [List offers by asset](https://docs.crypto.westminister.tech/api-reference/offers/list-offers-by-asset.md) - [List offers by rate range](https://docs.crypto.westminister.tech/api-reference/offers/list-offers-by-rate-range.md) - [List offers by type](https://docs.crypto.westminister.tech/api-reference/offers/list-offers-by-type.md) - [List offers by vendor](https://docs.crypto.westminister.tech/api-reference/offers/list-offers-by-vendor.md) - [List offers (paginated)](https://docs.crypto.westminister.tech/api-reference/offers/list-offers-paginated.md) - [Search offers](https://docs.crypto.westminister.tech/api-reference/offers/search-offers.md) - [Update offer](https://docs.crypto.westminister.tech/api-reference/offers/update-offer.md): Updates an offer only when it belongs to the authenticated user. - [Update offer available amount](https://docs.crypto.westminister.tech/api-reference/offers/update-offer-available-amount.md): Updates available amount only when the offer belongs to the authenticated user. New available amount must be greater than or equal to existing max_order. - [Update own offer](https://docs.crypto.westminister.tech/api-reference/offers/update-own-offer.md): Updates an offer only when it belongs to the authenticated user. - [Cancel order](https://docs.crypto.westminister.tech/api-reference/orders/cancel-order.md) - [Count all orders](https://docs.crypto.westminister.tech/api-reference/orders/count-all-orders.md) - [Count orders by customer](https://docs.crypto.westminister.tech/api-reference/orders/count-orders-by-customer.md) - [Count orders by status](https://docs.crypto.westminister.tech/api-reference/orders/count-orders-by-status.md) - [Count orders by vendor](https://docs.crypto.westminister.tech/api-reference/orders/count-orders-by-vendor.md) - [Create order (on-ramp or off-ramp)](https://docs.crypto.westminister.tech/api-reference/orders/create-order-on-ramp-or-off-ramp.md): Creates a new order for buying or selling cryptocurrency (USDT) with fiat currency (KES via M-Pesa). - [Customer order statistics](https://docs.crypto.westminister.tech/api-reference/orders/customer-order-statistics.md) - [Estimate USDT transfer network fee](https://docs.crypto.westminister.tech/api-reference/orders/estimate-usdt-transfer-network-fee.md): Estimates the network fee required for transferring USDT for an order. Supports both on-ramp (ON_RAMP_BUY) and off-ramp (OFF_RAMP_SELL) orders. - [Generate payment QR code](https://docs.crypto.westminister.tech/api-reference/orders/generate-payment-qr-code.md): Generates QR code data for payment addresses. Supports both on-ramp (ON_RAMP_BUY) and off-ramp (OFF_RAMP_SELL) orders. - [Get order by ID](https://docs.crypto.westminister.tech/api-reference/orders/get-order-by-id.md) - [Get order with details](https://docs.crypto.westminister.tech/api-reference/orders/get-order-with-details.md) - [Get stored pricing snapshot for an order](https://docs.crypto.westminister.tech/api-reference/orders/get-stored-pricing-snapshot-for-an-order.md) - [List expired orders](https://docs.crypto.westminister.tech/api-reference/orders/list-expired-orders.md) - [List orders by customer](https://docs.crypto.westminister.tech/api-reference/orders/list-orders-by-customer.md): Retrieves orders for a specific customer. Can optionally filter by order type. - [List orders by date range](https://docs.crypto.westminister.tech/api-reference/orders/list-orders-by-date-range.md) - [List orders by offer](https://docs.crypto.westminister.tech/api-reference/orders/list-orders-by-offer.md): Retrieves orders for a specific offer. Can optionally filter by order type. - [List orders by status](https://docs.crypto.westminister.tech/api-reference/orders/list-orders-by-status.md): Retrieves orders with a specific status. Can optionally filter by order type. - [List orders by vendor](https://docs.crypto.westminister.tech/api-reference/orders/list-orders-by-vendor.md): Retrieves orders for a specific vendor. Can optionally filter by order type. - [List orders (paginated)](https://docs.crypto.westminister.tech/api-reference/orders/list-orders-paginated.md): Retrieves a paginated list of orders. Can optionally filter by order type (on-ramp or off-ramp). - [List pending orders](https://docs.crypto.westminister.tech/api-reference/orders/list-pending-orders.md) - [Mark order as completed](https://docs.crypto.westminister.tech/api-reference/orders/mark-order-as-completed.md) - [Recent orders by customer](https://docs.crypto.westminister.tech/api-reference/orders/recent-orders-by-customer.md) - [Recent orders by vendor](https://docs.crypto.westminister.tech/api-reference/orders/recent-orders-by-vendor.md) - [Search orders](https://docs.crypto.westminister.tech/api-reference/orders/search-orders.md) - [Send USDT payment to escrow or destination address](https://docs.crypto.westminister.tech/api-reference/orders/send-usdt-payment-to-escrow-or-destination-address.md): Initiates USDT transfer from user's CoinPool wallet to the destination address. Supports both on-ramp (ON_RAMP_BUY) and off-ramp (OFF_RAMP_SELL) orders. - [Update order](https://docs.crypto.westminister.tech/api-reference/orders/update-order.md) - [Update order status](https://docs.crypto.westminister.tech/api-reference/orders/update-order-status.md) - [Vendor order statistics](https://docs.crypto.westminister.tech/api-reference/orders/vendor-order-statistics.md) - [Get OTC config (bank/MPesa display)](https://docs.crypto.westminister.tech/api-reference/otc-config/get-otc-config-bankmpesa-display.md) - [Confirm bank deposit (admin)](https://docs.crypto.westminister.tech/api-reference/otc-deposits/confirm-bank-deposit-admin.md) - [Create OTC deposit (bank or MPesa)](https://docs.crypto.westminister.tech/api-reference/otc-deposits/create-otc-deposit-bank-or-mpesa.md): Creates a new OTC deposit request. For bank: creates pending record. For MPesa: creates record and initiates STK push. - [Credit USDT to merchant (admin)](https://docs.crypto.westminister.tech/api-reference/otc-deposits/credit-usdt-to-merchant-admin.md): Proposes a multisig transfer from treasury to merchant wallet. Treasury must be multisig; OTC officer signs manually. - [Get OTC deposit by ID](https://docs.crypto.westminister.tech/api-reference/otc-deposits/get-otc-deposit-by-id.md) - [List deposits ready to credit (admin)](https://docs.crypto.westminister.tech/api-reference/otc-deposits/list-deposits-ready-to-credit-admin.md) - [List OTC deposits](https://docs.crypto.westminister.tech/api-reference/otc-deposits/list-otc-deposits.md): Merchants see their own; admins see all. - [List pending bank deposits (admin)](https://docs.crypto.westminister.tech/api-reference/otc-deposits/list-pending-bank-deposits-admin.md) - [Reject bank deposit (admin)](https://docs.crypto.westminister.tech/api-reference/otc-deposits/reject-bank-deposit-admin.md) - [Approve withdrawal (admin)](https://docs.crypto.westminister.tech/api-reference/otc-withdrawals/approve-withdrawal-admin.md) - [Create OTC withdrawal](https://docs.crypto.westminister.tech/api-reference/otc-withdrawals/create-otc-withdrawal.md) - [Execute withdrawal (admin)](https://docs.crypto.westminister.tech/api-reference/otc-withdrawals/execute-withdrawal-admin.md): Debits USDT from merchant to treasury, then bank (manual) or MPesa B2C. - [Get OTC withdrawal by ID](https://docs.crypto.westminister.tech/api-reference/otc-withdrawals/get-otc-withdrawal-by-id.md) - [List approved withdrawals (admin)](https://docs.crypto.westminister.tech/api-reference/otc-withdrawals/list-approved-withdrawals-admin.md) - [List OTC withdrawals](https://docs.crypto.westminister.tech/api-reference/otc-withdrawals/list-otc-withdrawals.md) - [List pending withdrawals (admin)](https://docs.crypto.westminister.tech/api-reference/otc-withdrawals/list-pending-withdrawals-admin.md) - [Reject withdrawal (admin)](https://docs.crypto.westminister.tech/api-reference/otc-withdrawals/reject-withdrawal-admin.md) - [Initiate payment for an order](https://docs.crypto.westminister.tech/api-reference/payment/initiate-payment-for-an-order.md) - [M-Pesa B2C queue timeout callback (public)](https://docs.crypto.westminister.tech/api-reference/payment/m-pesa-b2c-queue-timeout-callback-public.md) - [M-Pesa B2C result callback (public)](https://docs.crypto.westminister.tech/api-reference/payment/m-pesa-b2c-result-callback-public.md) - [M-Pesa C2B/STK callback (public — called by Safaricom)](https://docs.crypto.westminister.tech/api-reference/payment/m-pesa-c2bstk-callback-public-—-called-by-safaricom.md): No `Authorization` header; validates using your Daraja configuration. - [Compute quote from active profile + FX (admin)](https://docs.crypto.westminister.tech/api-reference/pricing/compute-quote-from-active-profile-+-fx-admin.md) - [Create FX rate quote (admin)](https://docs.crypto.westminister.tech/api-reference/pricing/create-fx-rate-quote-admin.md): Stores a reference and applied rate for a flow/asset/fiat pair. Used with pricing profiles when creating orders or transfers. - [Create pricing profile (admin)](https://docs.crypto.westminister.tech/api-reference/pricing/create-pricing-profile-admin.md): Creates a commercial pricing profile for a flow (`onramp`, `offramp`, `p2p`, `b2b`, `b2b2c`), asset (e.g. USDT), optional network/fiat scope, and fee model. - [Get active FX quote for flow/asset/fiat (admin)](https://docs.crypto.westminister.tech/api-reference/pricing/get-active-fx-quote-for-flowassetfiat-admin.md) - [Get FX quote by ID (admin)](https://docs.crypto.westminister.tech/api-reference/pricing/get-fx-quote-by-id-admin.md) - [Get pricing profile by ID (admin)](https://docs.crypto.westminister.tech/api-reference/pricing/get-pricing-profile-by-id-admin.md) - [List FX quotes (admin)](https://docs.crypto.westminister.tech/api-reference/pricing/list-fx-quotes-admin.md) - [List pricing profiles (admin)](https://docs.crypto.westminister.tech/api-reference/pricing/list-pricing-profiles-admin.md) - [Resolve active pricing IDs + commercial preview (authenticated)](https://docs.crypto.westminister.tech/api-reference/pricing/resolve-active-pricing-ids-+-commercial-preview-authenticated.md): Resolves the active `pricing_profile_id` and `fx_rate_quote_id` for the provided flow context, then returns a computed commercial preview. Intended for app clients before order creation. - [Set pricing profile active flag (admin)](https://docs.crypto.westminister.tech/api-reference/pricing/set-pricing-profile-active-flag-admin.md) - [Update pricing profile (admin)](https://docs.crypto.westminister.tech/api-reference/pricing/update-pricing-profile-admin.md) - [Get authenticated customer offers and orders](https://docs.crypto.westminister.tech/api-reference/transactions/get-authenticated-customer-offers-and-orders.md): Returns only the authenticated user's own data: - offers created by the authenticated user (`vendor_id = auth_user_id`) - orders created by the authenticated user (`customer_id = auth_user_id`) - [Get recent completed transactions with order details](https://docs.crypto.westminister.tech/api-reference/transactions/get-recent-completed-transactions-with-order-details.md): Returns a paginated list of completed transactions with their associated order details. This endpoint combines data from both the `transactions` and `orders` tables. - [B2B transfer to external address](https://docs.crypto.westminister.tech/api-reference/transfers/b2b-transfer-to-external-address.md) - [B2B transfer (vendor to vendor)](https://docs.crypto.westminister.tech/api-reference/transfers/b2b-transfer-vendor-to-vendor.md): Vendor/subvendor/admin only. Source wallet must be registered as multisig. **Platform-managed multisig** wallets may complete in one step (`200`) after internal approval. **Collaborative-signing** setups may return `202` with `proposal_id` for TRON/Ethereum multisig flows. - [Get stored pricing snapshot for a transfer](https://docs.crypto.westminister.tech/api-reference/transfers/get-stored-pricing-snapshot-for-a-transfer.md) - [Get transfer by ID (sender or recipient)](https://docs.crypto.westminister.tech/api-reference/transfers/get-transfer-by-id-sender-or-recipient.md) - [List transfers for current user](https://docs.crypto.westminister.tech/api-reference/transfers/list-transfers-for-current-user.md) - [P2P external transfer (non-platform address)](https://docs.crypto.westminister.tech/api-reference/transfers/p2p-external-transfer-non-platform-address.md) - [P2P internal transfer (platform user to user)](https://docs.crypto.westminister.tech/api-reference/transfers/p2p-internal-transfer-platform-user-to-user.md): Send USDT from the authenticated user to another user (by `to_user_id` or platform `to_address`). Requires a sender wallet that is eligible for P2P transfers (platform rules). Optional commercial snapshot: send all of `pricing_profile_id`, `fx_rate_quote_id`, `fiat_currency`, `fiat_amount_equivalent… - [Check if user exists by email](https://docs.crypto.westminister.tech/api-reference/users/check-if-user-exists-by-email.md): Returns true if user exists, false otherwise. - [Check if user exists by phone](https://docs.crypto.westminister.tech/api-reference/users/check-if-user-exists-by-phone.md): Returns true if user exists, false otherwise. - [Get total number of users](https://docs.crypto.westminister.tech/api-reference/users/get-total-number-of-users.md): Returns the total number of users in the system. - [Get total number of users by role](https://docs.crypto.westminister.tech/api-reference/users/get-total-number-of-users-by-role.md): Returns the total number of users for the specified role. - [Get user by email](https://docs.crypto.westminister.tech/api-reference/users/get-user-by-email.md): Returns user details for the specified email. - [Get user by ID](https://docs.crypto.westminister.tech/api-reference/users/get-user-by-id.md): Returns user details for the specified user ID. - [Get user by phone number](https://docs.crypto.westminister.tech/api-reference/users/get-user-by-phone-number.md): Returns user details for the specified phone number. - [List users by role (paginated)](https://docs.crypto.westminister.tech/api-reference/users/list-users-by-role-paginated.md): Returns a paginated list of users filtered by role. - [List users (paginated)](https://docs.crypto.westminister.tech/api-reference/users/list-users-paginated.md): Returns a paginated list of users. - [Login with 6-digit PIN](https://docs.crypto.westminister.tech/api-reference/users/login-with-6-digit-pin.md): Logs a user in using a 6-digit numeric PIN instead of a password. - [Login with email and password](https://docs.crypto.westminister.tech/api-reference/users/login-with-email-and-password.md): Logs a user in using email and password. Returns an access token and refresh token for authenticated API calls. - [Refresh access token](https://docs.crypto.westminister.tech/api-reference/users/refresh-access-token.md): Exchanges a valid refresh token for a new access token and a new refresh token. - [Register user, create default wallets, and return user and wallets with balances](https://docs.crypto.westminister.tech/api-reference/users/register-user-create-default-wallets-and-return-user-and-wallets-with-balances.md): Registers a new user, creates default Ethereum and TRON wallets, and initializes balances. - [Search users](https://docs.crypto.westminister.tech/api-reference/users/search-users.md): Search for users by query string (name/email/phone) with pagination. - [Soft delete user by ID](https://docs.crypto.westminister.tech/api-reference/users/soft-delete-user-by-id.md): Soft deletes (disables) the specified user ID. - [Update user active status by ID](https://docs.crypto.westminister.tech/api-reference/users/update-user-active-status-by-id.md): Updates the active/inactive status for the specified user ID. - [Update user KYC status by ID](https://docs.crypto.westminister.tech/api-reference/users/update-user-kyc-status-by-id.md): Updates the KYC status for the specified user ID. - [Update user password by ID](https://docs.crypto.westminister.tech/api-reference/users/update-user-password-by-id.md): Updates the password for the specified user ID. - [Update user PIN by ID](https://docs.crypto.westminister.tech/api-reference/users/update-user-pin-by-id.md): Sets or changes the 6-digit PIN used for PIN-based login and transaction authorization. - [Update user role by ID](https://docs.crypto.westminister.tech/api-reference/users/update-user-role-by-id.md): Updates the role for the specified user ID. - [Check if wallet address exists](https://docs.crypto.westminister.tech/api-reference/wallets-users/check-if-wallet-address-exists.md) - [Count wallets by user and network](https://docs.crypto.westminister.tech/api-reference/wallets-users/count-wallets-by-user-and-network.md) - [Count wallets for user](https://docs.crypto.westminister.tech/api-reference/wallets-users/count-wallets-for-user.md) - [Create wallet (initializes balances)](https://docs.crypto.westminister.tech/api-reference/wallets-users/create-wallet-initializes-balances.md): Creates a wallet for a user and initializes zero balances (ETH+USDT for ethereum, TRX+USDT for tron). - [Get aggregated USDT and native balances for all user wallets](https://docs.crypto.westminister.tech/api-reference/wallets-users/get-aggregated-usdt-and-native-balances-for-all-user-wallets.md): Returns aggregated USDT and native balances (TRX/ETH) for all wallets belonging to a user. Supports network filtering and optional force refresh from blockchain. - [Get default wallet for user](https://docs.crypto.westminister.tech/api-reference/wallets-users/get-default-wallet-for-user.md) - [Get default wallet for user and network](https://docs.crypto.westminister.tech/api-reference/wallets-users/get-default-wallet-for-user-and-network.md) - [Get wallet by address](https://docs.crypto.westminister.tech/api-reference/wallets-users/get-wallet-by-address.md) - [Get wallet by ID](https://docs.crypto.westminister.tech/api-reference/wallets-users/get-wallet-by-id.md) - [List active wallets by user](https://docs.crypto.westminister.tech/api-reference/wallets-users/list-active-wallets-by-user.md) - [List all wallets (paginated)](https://docs.crypto.westminister.tech/api-reference/wallets-users/list-all-wallets-paginated.md) - [List wallets by user](https://docs.crypto.westminister.tech/api-reference/wallets-users/list-wallets-by-user.md) - [List wallets by user and network](https://docs.crypto.westminister.tech/api-reference/wallets-users/list-wallets-by-user-and-network.md) - [Set wallet as default for network](https://docs.crypto.westminister.tech/api-reference/wallets-users/set-wallet-as-default-for-network.md) - [Soft delete wallet](https://docs.crypto.westminister.tech/api-reference/wallets-users/soft-delete-wallet.md) - [Update user by ID](https://docs.crypto.westminister.tech/api-reference/wallets-users/update-user-by-id.md): Updates user email, phone_number, first_name, last_name fields for the specified user ID. - [Update wallet active status](https://docs.crypto.westminister.tech/api-reference/wallets-users/update-wallet-active-status.md) - [Authentication](https://docs.crypto.westminister.tech/authentication.md): PASETO Bearer Tokens, Refresh Flow, and PIN Login - [Multisig Wallets](https://docs.crypto.westminister.tech/guides/multisig-wallets.md): Registering Multisig Wallets and Completing High-Value B2B Transfers with Collaborative Signing - [Orders and Payments](https://docs.crypto.westminister.tech/guides/orders-and-payments.md): Creating Quote-Backed Orders, Off-Ramp Flow, Fees, and Payment-Screen Endpoints - [Pricing and FX](https://docs.crypto.westminister.tech/guides/pricing-and-fx.md): Pricing Profiles, FX Quotes, and Quote-Backed Commercial Snapshots for Orders and Transfers - [Transfers (P2P and B2B)](https://docs.crypto.westminister.tech/guides/transfers-p2p-b2b.md): USDT Transfers Between Users, External Addresses, and Vendors/Merchants with Optional Pricing Snapshots - [CoinPool API](https://docs.crypto.westminister.tech/index.md): Crypto-Fiat Bridge for B2B, B2B2C and P2P On/Off-Ramp Trading - [Introduction](https://docs.crypto.westminister.tech/introduction.md): CoinPool API Documentation - Crypto-Fiat Bridge for B2B, B2B2C and P2P On/Off-Ramp Trading - [Quickstart](https://docs.crypto.westminister.tech/quickstart.md): Get Started with the CoinPool API in Under 5 Minutes ## OpenAPI Specs - [openapi](https://docs.crypto.westminister.tech/openapi.yaml)