Skip to main content
POST
/
rest
/
block-trade
/
new
Book a Block Trade
curl --request POST \
  --url https://api.exchange.fairx.net/rest/block-trade/new \
  --header 'Content-Type: application/json' \
  --data '
{
  "buyer_entity": "buyerEntity1",
  "seller_entity": "sellerEntity1",
  "report_entity": "reportingEntity1",
  "buyer_trader": "buyerTrader1",
  "seller_trader": "sellerTrader1",
  "report_trader": "reportingTrader1",
  "buyer_account": "buyerAccount1",
  "seller_account": "sellerAccount1",
  "symbol": "BIPZ30",
  "quantity": 100,
  "price": 45000.5,
  "request_timestamp": "2025-01-13T14:30:00Z",
  "handling_inst": "ELECTRONIC",
  "buyer_cl_ord_id": "clientOrderBuy1",
  "seller_cl_ord_id": "clientOrderSell1",
  "tas_sub_type": "TAS",
  "tick_differential": 2
}
'
import requests

url = "https://api.exchange.fairx.net/rest/block-trade/new"

payload = {
"buyer_entity": "buyerEntity1",
"seller_entity": "sellerEntity1",
"report_entity": "reportingEntity1",
"buyer_trader": "buyerTrader1",
"seller_trader": "sellerTrader1",
"report_trader": "reportingTrader1",
"buyer_account": "buyerAccount1",
"seller_account": "sellerAccount1",
"symbol": "BIPZ30",
"quantity": 100,
"price": 45000.5,
"request_timestamp": "2025-01-13T14:30:00Z",
"handling_inst": "ELECTRONIC",
"buyer_cl_ord_id": "clientOrderBuy1",
"seller_cl_ord_id": "clientOrderSell1",
"tas_sub_type": "TAS",
"tick_differential": 2
}
headers = {"Content-Type": "application/json"}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
buyer_entity: 'buyerEntity1',
seller_entity: 'sellerEntity1',
report_entity: 'reportingEntity1',
buyer_trader: 'buyerTrader1',
seller_trader: 'sellerTrader1',
report_trader: 'reportingTrader1',
buyer_account: 'buyerAccount1',
seller_account: 'sellerAccount1',
symbol: 'BIPZ30',
quantity: 100,
price: 45000.5,
request_timestamp: '2025-01-13T14:30:00Z',
handling_inst: 'ELECTRONIC',
buyer_cl_ord_id: 'clientOrderBuy1',
seller_cl_ord_id: 'clientOrderSell1',
tas_sub_type: 'TAS',
tick_differential: 2
})
};

fetch('https://api.exchange.fairx.net/rest/block-trade/new', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.exchange.fairx.net/rest/block-trade/new",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'buyer_entity' => 'buyerEntity1',
'seller_entity' => 'sellerEntity1',
'report_entity' => 'reportingEntity1',
'buyer_trader' => 'buyerTrader1',
'seller_trader' => 'sellerTrader1',
'report_trader' => 'reportingTrader1',
'buyer_account' => 'buyerAccount1',
'seller_account' => 'sellerAccount1',
'symbol' => 'BIPZ30',
'quantity' => 100,
'price' => 45000.5,
'request_timestamp' => '2025-01-13T14:30:00Z',
'handling_inst' => 'ELECTRONIC',
'buyer_cl_ord_id' => 'clientOrderBuy1',
'seller_cl_ord_id' => 'clientOrderSell1',
'tas_sub_type' => 'TAS',
'tick_differential' => 2
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.exchange.fairx.net/rest/block-trade/new"

payload := strings.NewReader("{\n \"buyer_entity\": \"buyerEntity1\",\n \"seller_entity\": \"sellerEntity1\",\n \"report_entity\": \"reportingEntity1\",\n \"buyer_trader\": \"buyerTrader1\",\n \"seller_trader\": \"sellerTrader1\",\n \"report_trader\": \"reportingTrader1\",\n \"buyer_account\": \"buyerAccount1\",\n \"seller_account\": \"sellerAccount1\",\n \"symbol\": \"BIPZ30\",\n \"quantity\": 100,\n \"price\": 45000.5,\n \"request_timestamp\": \"2025-01-13T14:30:00Z\",\n \"handling_inst\": \"ELECTRONIC\",\n \"buyer_cl_ord_id\": \"clientOrderBuy1\",\n \"seller_cl_ord_id\": \"clientOrderSell1\",\n \"tas_sub_type\": \"TAS\",\n \"tick_differential\": 2\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.exchange.fairx.net/rest/block-trade/new")
.header("Content-Type", "application/json")
.body("{\n \"buyer_entity\": \"buyerEntity1\",\n \"seller_entity\": \"sellerEntity1\",\n \"report_entity\": \"reportingEntity1\",\n \"buyer_trader\": \"buyerTrader1\",\n \"seller_trader\": \"sellerTrader1\",\n \"report_trader\": \"reportingTrader1\",\n \"buyer_account\": \"buyerAccount1\",\n \"seller_account\": \"sellerAccount1\",\n \"symbol\": \"BIPZ30\",\n \"quantity\": 100,\n \"price\": 45000.5,\n \"request_timestamp\": \"2025-01-13T14:30:00Z\",\n \"handling_inst\": \"ELECTRONIC\",\n \"buyer_cl_ord_id\": \"clientOrderBuy1\",\n \"seller_cl_ord_id\": \"clientOrderSell1\",\n \"tas_sub_type\": \"TAS\",\n \"tick_differential\": 2\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.exchange.fairx.net/rest/block-trade/new")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"buyer_entity\": \"buyerEntity1\",\n \"seller_entity\": \"sellerEntity1\",\n \"report_entity\": \"reportingEntity1\",\n \"buyer_trader\": \"buyerTrader1\",\n \"seller_trader\": \"sellerTrader1\",\n \"report_trader\": \"reportingTrader1\",\n \"buyer_account\": \"buyerAccount1\",\n \"seller_account\": \"sellerAccount1\",\n \"symbol\": \"BIPZ30\",\n \"quantity\": 100,\n \"price\": 45000.5,\n \"request_timestamp\": \"2025-01-13T14:30:00Z\",\n \"handling_inst\": \"ELECTRONIC\",\n \"buyer_cl_ord_id\": \"clientOrderBuy1\",\n \"seller_cl_ord_id\": \"clientOrderSell1\",\n \"tas_sub_type\": \"TAS\",\n \"tick_differential\": 2\n}"

response = http.request(request)
puts response.read_body
{
  "trade_id": 12345,
  "buyer_trader": "buyerTrader1",
  "seller_trader": "sellerTrader1",
  "reporting_trader": "reportingTrader1",
  "buyer_itm_code": "itmCode1",
  "buyer_ncp_code": "ncpCode1",
  "buyer_fcm_code": "fcmCode1",
  "buyer_firm_code": "firmCode1",
  "seller_itm_code": "itmCode2",
  "seller_ncp_code": "ncpCode2",
  "seller_fcm_code": "fcmCode2",
  "seller_firm_code": "firmCode2",
  "reporting_firm_code": "firmCode1",
  "buyer_entity": "buyerEntity1",
  "seller_entity": "sellerEntity1",
  "buyer_entity_uuid": "123e4567-e89b-12d3-a456-426614174000",
  "seller_entity_uuid": "abcdef12-3456-7890-abcd-ef1234567890",
  "buyer_account": "buyerAccount1",
  "seller_account": "sellerAccount1",
  "reporting_entity": "reportingEntity1",
  "reporting_entity_uuid": "f81d4fae-7dec-11d0-a765-00a0c91e6bf6",
  "broker_code": "brokerCode1",
  "executing_trader": "execTrader1",
  "symbol": "BIPZ30",
  "buyer_client_order_id": "clientOrderBuy1",
  "seller_client_order_id": "clientOrderSell1",
  "transact_timestamp": "2025-01-13T14:30:00Z",
  "sending_timestamp": "2025-01-13T14:29:59Z",
  "trading_session_date": "2025-01-13",
  "handling_inst": "ELECTRONIC",
  "quantity": 100,
  "price": 45000.5,
  "event_type": "FILLED",
  "buyer_fill_id": 98765,
  "seller_fill_id": 98766,
  "buyer_cust_order_capacity": "CTI4",
  "seller_cust_order_capacity": "CTI4",
  "buyer_participant_type": "customer",
  "seller_participant_type": "customer",
  "reported_by_broker": false,
  "placed_by_admin": false,
  "reject_details": "<string>",
  "status": "ACTIVE",
  "last_updated_trading_session_date": "2025-01-13",
  "last_updated_timestamp": "2025-01-13T14:30:05Z",
  "clearing_timestamp": "2025-01-13T14:31:00Z",
  "is_tas_order": true,
  "tick_differential": 5,
  "price_differential": "2.50",
  "effective_price": "45003.00"
}

Body

application/json

Block trade booking parameters for regular and TAS trades

buyer_entity
string
Example:

"buyerEntity1"

seller_entity
string
Example:

"sellerEntity1"

report_entity
string
Example:

"reportingEntity1"

buyer_trader
string
Example:

"buyerTrader1"

seller_trader
string
Example:

"sellerTrader1"

report_trader
string
Example:

"reportingTrader1"

buyer_account
string
Example:

"buyerAccount1"

seller_account
string
Example:

"sellerAccount1"

symbol
string
Example:

"BIPZ30"

quantity
integer<int32>
Example:

100

price
number<double>

Required for non-TAS block trades. Must be omitted for TAS block trades.

Example:

45000.5

request_timestamp
string
Example:

"2025-01-13T14:30:00Z"

handling_inst
enum<string>
Available options:
DESK,
ELECTRONIC,
VENDOR_PROVIDED,
SPONSORED_ACCESS,
PREMIUM_ALGO_TRADING,
OTHER,
PHONE,
DESK_PIT
Example:

"ELECTRONIC"

buyer_cl_ord_id
string | null
Example:

"clientOrderBuy1"

seller_cl_ord_id
string | null
Example:

"clientOrderSell1"

tas_sub_type
enum<string> | null

Set to TAS for TAS block trades. If omitted, the request is treated as a non-TAS block trade.

Available options:
NULL_VAL,
TAS
Example:

"TAS"

tick_differential
integer<int64> | null

Required for TAS block trades and must be omitted for non-TAS block trades. Expressed as the number of ticks from settlement.

Example:

2

Response

Block trade booked successfully

trade_id
integer<int64>
Example:

12345

buyer_trader
string
Example:

"buyerTrader1"

seller_trader
string
Example:

"sellerTrader1"

reporting_trader
string
Example:

"reportingTrader1"

buyer_itm_code
string
Example:

"itmCode1"

buyer_ncp_code
string
Example:

"ncpCode1"

buyer_fcm_code
string
Example:

"fcmCode1"

buyer_firm_code
string
Example:

"firmCode1"

seller_itm_code
string
Example:

"itmCode2"

seller_ncp_code
string
Example:

"ncpCode2"

seller_fcm_code
string
Example:

"fcmCode2"

seller_firm_code
string
Example:

"firmCode2"

reporting_firm_code
string
Example:

"firmCode1"

buyer_entity
string
Example:

"buyerEntity1"

seller_entity
string
Example:

"sellerEntity1"

buyer_entity_uuid
string
Example:

"123e4567-e89b-12d3-a456-426614174000"

seller_entity_uuid
string
Example:

"abcdef12-3456-7890-abcd-ef1234567890"

buyer_account
string
Example:

"buyerAccount1"

seller_account
string
Example:

"sellerAccount1"

reporting_entity
string
Example:

"reportingEntity1"

reporting_entity_uuid
string
Example:

"f81d4fae-7dec-11d0-a765-00a0c91e6bf6"

broker_code
string
Example:

"brokerCode1"

executing_trader
string
Example:

"execTrader1"

symbol
string
Example:

"BIPZ30"

buyer_client_order_id
string
Example:

"clientOrderBuy1"

seller_client_order_id
string
Example:

"clientOrderSell1"

transact_timestamp
string
Example:

"2025-01-13T14:30:00Z"

sending_timestamp
string
Example:

"2025-01-13T14:29:59Z"

trading_session_date
string<date>
Example:

"2025-01-13"

handling_inst
enum<string>
Available options:
DESK,
ELECTRONIC,
VENDOR_PROVIDED,
SPONSORED_ACCESS,
PREMIUM_ALGO_TRADING,
OTHER,
PHONE,
DESK_PIT
Example:

"ELECTRONIC"

quantity
integer<int32>
Example:

100

price
string
Example:

45000.5

event_type
enum<string>
Available options:
SUBMITTED,
REJECTED,
CANCELED,
REPLACED,
FILLED,
STOP_TRIGGERED,
FILL_CANCELED,
FILL_AMENDED,
UNKNOWN
Example:

"FILLED"

buyer_fill_id
integer<int64>
Example:

98765

seller_fill_id
integer<int64>
Example:

98766

buyer_cust_order_capacity
enum<string>
Available options:
CTI1,
CTI2,
CTI3,
CTI4
Example:

"CTI4"

seller_cust_order_capacity
enum<string>
Available options:
CTI1,
CTI2,
CTI3,
CTI4
Example:

"CTI4"

buyer_participant_type
string
Example:

"customer"

seller_participant_type
string
Example:

"customer"

reported_by_broker
boolean
Example:

false

placed_by_admin
boolean
Example:

false

reject_reason
enum<string>
Available options:
ERROR,
UNKNOWN_INSTRUMENT,
UNKNOWN_ACCOUNT,
UNKNOWN_TRADER,
CL_ORD_ID_IN_USE,
QTY_TOO_SMALL,
QTY_TOO_LARGE,
INVALID_FIELD_VALUE,
NOT_ALLOWED_BY_TRADING_STATE,
POSITION_LIMIT,
PRICE_BAND_OUT_OF_RANGE,
PRICE_LIMIT,
TRADER_NOT_PERMITTED,
POSITION_LIMIT_NOT_SET,
UNKNOWN_FIRM,
POSITION_DAILY_LIMIT,
FIRM_NOT_ALLOW_TRADE_PRODUCT,
TAS_INVALID_DIFFERENTIAL,
TAS_INVALID_TRADE_TIME,
TAS_NO_UNDERLYING_MAPPING,
TAS_SETTLEMENT_NOT_AVAILABLE,
TAS_TRADE_AFTER_SETTLEMENT
reject_details
string
status
enum<string>
Available options:
ACTIVE,
CANCELED
Example:

"ACTIVE"

last_updated_trading_session_date
string<date>
Example:

"2025-01-13"

last_updated_timestamp
string
Example:

"2025-01-13T14:30:05Z"

clearing_timestamp
string
Example:

"2025-01-13T14:31:00Z"

is_tas_order
boolean

Indicates whether this is a Trade at Settlement (TAS) order

Example:

true

tick_differential
integer<int64> | null

The price differential in ticks for TAS orders. Only present when is_tas_order is true.

Example:

5

price_differential
string | null

The price differential as a decimal value for TAS orders. This represents the actual price impact of the tick differential. Only present when is_tas_order is true.

Example:

"2.50"

effective_price
string

The effective price of the block trade. For TAS orders, this is calculated from the settlement price plus the price differential.

Example:

"45003.00"