Share
Explore

icon picker
OTC Product Requirements

Overview
OTC Product Flow-Manual OTC.jpg
User Stories
Let’s divide the product in three modules
Pre-Trade
In-Trade
Post-Trade
We’ve two major personas using the platform
Admin (all internal teams)
Client
Note: Below user stories are put considering only spot transactions

Pre-Trade

Trade Inquiry

Client is able to
inquire about the quotes on telegram, web interface etc.
[optional] run pre-trade risk assessments: volatility, price slippage etc.
see the expired quote in case market conditions change quickly
provide feedback in case quote seems too high
Admin is able to
fetch quotes from MM for instant fills (time window, volatility risks included) with symbol, size, side, time window etc.
share the quote with the client (preferably automatic)
able to set dynamic spreads basis volatility
able to see deviation from major exchanges in terms of price impact - it can be a function of liquidity across major exchanges
define pre-trade risks: max trade size per client, high-volatile duration, max price slippage
receive alert on client liveness as soon as client is live on interface - to suggest alternate execution method
kill the quotes presented to the client in case market conditions change too quickly
Inner Workings
Client chooses between Instant Fill and Advanced Execution (TWAP, VWAP, Iceberg Orders)
Client needs quote for the trade (instant fill)
Client tells Asset, Order Size, Side, Instant Fill (Yes or No)
Basis this, Admin requests for quote from Quant Desk using QD’s APIs after entering all the required values with quote ID | REST API
QD acknowledges the quote | REST API response
Quant desk shares the quote with expiry time with quote ID as above | WebSocket Message to CoinDCX
Quote gets shared with the client with quote ID automatically over telegram (TG Bot) or web interface | CoinDCX stores the quote response in the Database and shares the quote with Client on Websocket
Client accepts/rejects the quote [additionally can provide feedback - too high, too less expiry time etc.] | Client hits the API with Quote ID
Market Data: We can continue to stream combined order book data - (sum of) quantity and prices - QD can stream this data

KYC [We’ll do Offline]

Admin is able to
Mark Client as verified | Access control on all Pre-Trade, Trade, Post-Trade APIs until KYC is true

In-Trade

Pricing

Admin is able to
fetch quotes from MM for instant fills (time window, volatility risks included) with symbol, size, side, time window etc.
add spread (margin risk) to it
share the quote with the client (preferably automatic)
Client is able to
receive quote on web interface, telegram etc.
express the interest on the pricing
Inner Workings
Risks include: Settlement Risk, Slippage Risk (time window)
For the sake of simplicity: We don’t model settlement risk at the beginning and carry slippage risk
Slippage risk is covered by QD in the quote - hence we don’t add spread to the quotes
Before sending the quote with client | CoinDCX adds the spread % on top of quote in WS API response to the client

Trade Execution

Admin is able to
run advanced execution for the client
place TWAP order with symbol, size, side, duration, aggression etc.
place VWAP order with symbol, size, side, duration, aggression etc.
place Iceberg order with symbol, total size, visible portion size etc.
define maximum slippage impact, limit price and other additional parameters in the order entry
Inner Workings
client/admin requests any of TWAP, VWAP, POV execution algorithms
client quotes below parameters | REST API with request params
symbol
size
side
duration
completion - yes or no?
limit price
percentage participation - %
maximum slippage impact - if any
CD stores the request params with order Id and hit the QD’s REST API for advanced execution with order Id

Order and Trades Updates

Admin is able to
monitor the progress of the orders on the dashboard: Fill Percentage, progress, status etc.
kill/pause the order with remarks
Client is able to
monitor the progress of the orders on the web interface: Fill Percentage, progress, status etc.
kill/pause the order with remarks
receive notifications on web interface, chat and email regarding order-trade updates
view failed order (in case it happens)and notify admin
Inner Workings
CD receives the Order ID trade fills over Websocket Response from QD
Params
orderId
tradeId
timestamp
symbol
side
original Qty
filled Qty
executed Price
trade# e.g. 1/n, 2/n .. 12/12
CD saves all the trade fills in the database
CD sends the trade fills for Order ID with trades IDs to client over Websocket Response
WS comms can be received either on web interface or telegram

Post-Trade

Orders and Trades History

Admin is able to
track all quotes, orders, trades history within admin interface for each client
track price deviation between quotes and trades for each quote id for the client
export in CSV, JSON formats
Client is able to
track all quotes, orders, trades history with the web interface
export in CSV, JSON formats
Inner Workings
CD provides all the quotes, orders, trades over REST API to client/admin
Quotes Response Params
quoteId
timestamp
symbol
side
size
Order Response Params
orderId
timestamp
symbol
side
size
quotePrice - if any
strategyType
duration
completion - yes or no?
limitPrice
percentageParticipation - %
maximum slippage impact - if any
fillStatus
Trades Response Params
tradeId
orderId
timestamp
symbol
side
originalQty
filledQty
executedPrice
trade# e.g. 1/n, 2/n .. 12/12
CD provides REST API for client/admin to view the trades against every executed order
CD provides API to export the data from database in S3 bucket and provides link to download the historical data

Transaction Costs Analysis

Admin is able to
track TCA reports for the orders
track TWAP and VWAP execution quality: Execution Price vs Benchmark Price. E.g. For 5% volumes of VWAP for 1 hour duration. The price should be equal or better than benchmark VWAP price.
track Quote price vs Executed Price and Savings %
track orders split on various exchanges with executed prices and trades
track spread (revenue) earned vs price improvement for each of the quotes provided to the client
track costs of each orders: executed prices, fees paid etc.
Client is able to
track execution quality of order with price improvement from benchmark price
Inner Workings
CD provides API to client/admin to track the execution price and benchmark price
orderId
timestamp
symbol
side
size
strategyType
duration
executedPrice
benchmarkPrice (TWAP, VWAP)
savings ($)
savings (%)
benchmarkTradeQty
benchmarkTradePrice
benchmarkTradeVolume
How to calculate benchmark price
TWAP:
image.png
VWAP
image.png
POV
POV’s benchmark price should mirror VWAP price as per the execution. Idea is to blend the volumes in the market volumes.

Settlements

Admin is able to
track balances across all assets
track all the incoming and outgoing settlements with timestamps and statuses
initiate a required amount of deposit
initiate a settled asset (stable in case of sell, asset in case of buy)
show flagged CD and CW transactions
settle unclaimed asset in off-exchange, if client fails to collect the asset
Client is able to
track balances across all assets
track settlements with statuses: initiated, pending, completed, or failed
track due settlements with time left (usually T+1)
receive notifications for settlement reminders and statuses
initiate settlement to deposit required amount of asset
open ongoing settlement and withdraw assigned asset
whitelist wallets to receive and deposit the assets
track flagged transactions from AML
Inner Workings
CD provides REST API to clients to fetch current NET balances across assets - balance in negative means due for settlement
NET Balance = Client Deposits (total) - Client Withdrawals (total) - Margin Facilitated + Unsettled Assets
CD provides ledger transactions for different assets including all the pre-funded, trade on margin balances
Params
TxnId, timestamp, Asset, Qty, type (deposit, withdrawal), status, txnHash
Margin History
TxnId, timestamp, Asset, Qty, status
CD provides REST API to fetch settlement amount and due date-time
CD provides REST API to show the deposit address basis params like asset and network
CD provides confirmation REST API to submit the deposit request - params - asset, network, quantity and txnHash
CD provides REST API to whitelist wallet addresses for each network
CD provides REST API to withdrawal for client - asset, quantity, network, destination address (whitelisted) and returns response with txnId, timestamp, txnHash, asset, quantity, network, destination address (whitelisted) etc.
the withdrawal should block unsettled assets [locked]
CD sends push notification to client’s email, telegram, chrome for every successful deposit and withdrawal

Other important modules

Access Control

As super admin, I should be able to create and assign roles (e.g. compliance, risk, trading operations etc.) so that each admin user gets access only to functions relevant to their responsibilities.
Inner Workings
CD provides REST API to client to provide access to key functions for each specific role and assign it to person
CD provides REST API to admin to provide access to key functions for each specific role and assign to person

System Health Metrics

As an admin (trading operations), I should be able to see real-time dashboard displaying system health metrics e.g. Uptime, Exchange downtime, API latency, error rates etc.
As an admin, I should be able to receive notifications in case of deviation from usual norms
Inner Workings
CD provides REST API to fetch below response
Order API error rate: number of failed order API requests/total order API requests
Quote API error rate: number of failed quote API requests/total quote API requests
API latency : Median latency of Order API (QD) response
Request parameters: Time window (starttime, endtime)

Business Metrics

As super admin, I should be able to track real-time business metrics (revenue, costs, slippage data etc.)
As an admin, I should be able to receive notifications on periodic business reports (similar to superset pro-futures reports)
Inner Workings
CD provides REST API to fetch: Request Params (starttime, endtime)
total clients traded
total quotes streamed
total orders placed
total qty traded in USDT (volume)
total qty traded over telegram, web interface, API in USDT
total qty by strategy type
average spread per order
total revenue
CD provides trend API for duration
array of [qty traded in USDT (volume)]
array of [revenue in USDT]
array of [revenue by strategy type]

Fund Operations

As an admin, I should be able to track margin balances and transfer funds in real-time to ensure sufficient margin for trade execution
As an admin, I should be able to receive notifications in case we fall short of margin below certain threshold
Inner Workings
CD provides REST API to fetch balances across multiple exchanges (nodal accounts)
CD maintains 80% of daily trading balances [How does QD transfer balances across exchanges]
Seed amount: $5mn USDT (maybe)
Assets for shorting: Not sure how we handle this - do we facilitate the margin here over client pre-funds
CD sends push notifications in slack for balance limit <80% of average of last 7d daily rolling margin requirements

Client Trading Limits

As an admin, I should be able to set and adjust trading limits (trade margin, margin to be extended) for each client based on their risk profile to manage exposure
As an admin, I should be able to update and manage margin limits of each client
As an admin, I should be able to monitor the exposure in terms of assets due for settlement

Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
CtrlP
) instead.