NAV

Block Trading

Gemini Block TradingTM is a fully electronic block trading facility that enables traders to buy and sell large block quantities of digital assets outside of the auction and continuous order books.

See https://gemini.com/marketplace/#gemini-block-trading for more details.

Workflow

Taker places an IOI

A taker sends an IOI with the following details:

The IOI is firm until the expiry time, one minute after it is accepted. IOIs cannot be cancelled or changed.

See Block Trading: Takers for detailed documentation on how to submit an IOI.

Auction

Takers may not place IOIs for a symbol twenty-five (25) minutes before each auction on Gemini Exchange. See https://gemini.com/marketplace/#gemini-auction for auction information and schedules.

The last block trade before the auctions prints publicly fifteen (15) minutes before the scheduled auction.

IOI is broadcast to market makers

The IOI is broadcast to market makers with the following details:

Market makers respond

Makers submit may submit block limit orders in response up until the IOI expiry time.

See Block Trading: Makers for details on how to receive and respond to IOIs.

Block trade executes

At the expiry time, the block trading engine matches the taker IOI against the maker responses.

If successful, the taker and maker(s) receive immediate notification of the trade

If unsuccessful or only partially successful, all remaining quantity and unfilled orders will be cancelled and closed.

Block trade prints

Ten minutes later, the block trade prints to public APIs with the following details:

See Block Trading: Market Data for more details.

Third Party Support

Block trading FIX APIs offer third party support for both takers and market makers.

See FIX API documents for more information:

Testing

Block track testing is available in our sandbox environment.

Email institutional@gemini.com to coordinate.

Symbols and Minimums

Symbols are formatted as CCY1CCY2 where prices are in CCY2 and quantities are in CCY1, as this table makes explicit:

Symbol Price currency Quantity currency Minimum order size Minimum order increment Minimum price increment
btcusd USD BTC 10 BTC 0.00000001 BTC (1e-8) 0.01 USD
ethusd USD ETH 100 ETH 0.000001 ETH (1e-6) 0.01 USD
ethbtc BTC ETH 100 ETH 0.000001 ETH (1e-6) 0.00001 BTC (1e-5)
zecusd USD ZEC 200 ZEC 0.000001 ZEC (1e-6) 0.01 USD
zecbtc BTC ZEC 200 ZEC 0.000001 ZEC (1e-6) 0.00001 BTC (1e-5)
zeceth ETH ZEC 200 ZEC 0.000001 ZEC (1e-6) 0.0001 ETH (1e-4)
zecbch BCH ZEC 200 ZEC 0.000001 ZEC (1e-6) 0.0001 BCH (1e-4)
zecltc LTC ZEC 200 ZEC 0.000001 ZEC (1e-6) 0.001 LTC (1e-3)
bchusd USD BCH 100 BCH 0.000001 BCH (1e-6) 0.01 USD
bchbtc BTC BCH 100 BCH 0.000001 BCH (1e-6) 0.00001 BTC (1e-5)
bcheth ETH BCH 100 BCH 0.000001 BCH (1e-6) 0.0001 ETH (1e-4)
ltcusd USD LTC 1000 LTC 0.00001 LTC (1e-5) 0.01 USD
ltcbtc BTC LTC 1000 LTC 0.00001 LTC (1e-5) 0.00001 BTC (1e-5)
ltceth ETH LTC 1000 LTC 0.00001 LTC (1e-5) 0.0001 ETH (1e-4)
ltcbch BCH LTC 1000 LTC 0.00001 LTC (1e-5) 0.0001 BCH (1e-4)

Block trading taker orders may optionally supply a minimum quantity: when present, this value must be greater than or equal to the minimum order size for the symbol. When absent, the minimum fill quantity will be the minimum order size for the symbol.

Precision

Quantity and price on incoming orders are strictly held to the minimums and increments on the table shown above.

However, notional values and average prices may exhibit additional precision down to two decimal places past the "minimum order increment" listed above.

Takers

Takers can place an IOI using FIX, REST, or the UI.

FIX

Place an IOI by creating a New Order Single <D> message with:

Example IOI

This is a New Order Single <D> message representing an IOI to sell 20 BTC (minimum fill quantity 10 BTC) at a limit price of 999.99 USD. Some details worth noting: - The block order’s limit price must be within 5% of the midpoint of the related continuous order book at the time of order submission.

RAW
8=FIX.4.4|9=149|35=D|34=2|49=DEV|52=20180322-22:20:54.327|56=GEMINI|11=eSdLCsZRXiyNtbh|18=j|38=20|40=2|44=999.99|54=2|55=BTCUSD|59=3|60=19700101-00:00:00.003|110=10|10=212|

HEADER
        8                   BeginString: FIX.4.4
        9                    BodyLength: 149
       34                     MsgSeqNum: 2
       35                       MsgType: NewOrderSingle (D)
       49                  SenderCompID: DEV
       52                   SendingTime: 20180322-22:20:54.327
       56                  TargetCompID: GEMINI
BODY
       11                       ClOrdID: eSdLCsZRXiyNtbh
       18                      ExecInst: SINGLE_EXECUTION_REQUESTED_FOR_BLOCK_TRADE (j)
       38                      OrderQty: 20
       40                       OrdType: LIMIT (2)
       44                         Price: 999.99
       54                          Side: SELL (2)
       55                        Symbol: BTCUSD
       59                   TimeInForce: IMMEDIATE_OR_CANCEL (3)
       60                  TransactTime: 20180322-22:20:54.324
      110                        MinQty: 10
TRAILER
       10                      CheckSum: 212

IOI Accepted

Execution Report <8> showing that the IOI has been accepted.

RAW
8=FIX.4.4|9=171|35=8|34=2|49=GEMINI|52=20180322-22:20:54.588|56=DEV|6=0|11=eSdLCsZRXiyNtbh|14=0|17=29|37=28|38=20|39=0|44=999.99|54=2|55=BTCUSD|59=3|60=20180218-18:45:02.017|150=0|151=20|10=126|

HEADER
        8                   BeginString: FIX.4.4
        9                    BodyLength: 171
       34                     MsgSeqNum: 2
       35                       MsgType: ExecutionReport (8)
       49                  SenderCompID: GEMINI
       52                   SendingTime: 20180322-22:20:54.588
       56                  TargetCompID: DEV
BODY
        6                         AvgPx: 0
       11                       ClOrdID: eSdLCsZRXiyNtbh
       14                        CumQty: 0
       17                        ExecID: 29
       37                       OrderID: 28
       38                      OrderQty: 20
       39                     OrdStatus: NEW (0)
       44                         Price: 999.99
       54                          Side: SELL (2)
       55                        Symbol: BTCUSD
       59                   TimeInForce: IMMEDIATE_OR_CANCEL (3)
       60                  TransactTime: 20180322-22:20:54.587
      150                      ExecType: NEW (0)
      151                     LeavesQty: 20
TRAILER
       10                      CheckSum: 126

IOI Executes

After the taker order is accepted, makers receive an IOI advertisement that contains the quantity, minimum quantity, and a collar price (the midpoint of the Gemini continuous book). The IOI has an expiry time of one minute, during which makers may submit but not cancel block orders.

In this example, imagine that a single maker placed a block order to buy 10 BTC at 1000 USD. When the block trade engine automatches the maker order against the taker order at the expiry time, this will partially fill the IOI.

The taker would receive two Execution Report <8> messages showing the partial fill and the remaining quantity being cancelled.

IOI Partial Fill

RAW
8=FIX.4.4|9=220|35=8|34=3|49=GEMINI|52=20180322-22:20:54.735|56=DEV|6=1000|11=eSdLCsZRXiyNtbh|12=100.0000|13=3|14=10|17=33|31=1000|32=10|37=28|38=20|39=1|44=999.99|54=2|55=BTCUSD|59=3|60=20180218-18:45:02.021|150=F|151=10|479=USD|851=2|10=122|

HEADER
        8                   BeginString: FIX.4.4
        9                    BodyLength: 220
       34                     MsgSeqNum: 3
       35                       MsgType: ExecutionReport (8)
       49                  SenderCompID: GEMINI
       52                   SendingTime: 20180322-22:20:54.735
       56                  TargetCompID: DEV
BODY
        6                         AvgPx: 1000
       11                       ClOrdID: eSdLCsZRXiyNtbh
       12                    Commission: 100.0000
       13                      CommType: ABSOLUTE (3)
       14                        CumQty: 10
       17                        ExecID: 33
       31                        LastPx: 1000
       32                       LastQty: 10
       37                       OrderID: 28
       38                      OrderQty: 20
       39                     OrdStatus: PARTIALLY_FILLED (1)
       44                         Price: 999.99
       54                          Side: SELL (2)
       55                        Symbol: BTCUSD
       59                   TimeInForce: IMMEDIATE_OR_CANCEL (3)
       60                  TransactTime: 20180322-22:20:54.734
      150                      ExecType: TRADE (F)
      151                     LeavesQty: 10
      479                  CommCurrency: USD
      851              LastLiquidityInd: REMOVED_LIQUIDITY (2)
TRAILER
       10                      CheckSum: 122

IOI Remaining Quantity Cancelled

RAW
8=FIX.4.4|9=199|35=8|34=4|49=GEMINI|52=20180322-22:20:54.746|56=DEV|6=1000|11=eSdLCsZRXiyNtbh|14=10|17=34|37=28|38=20|39=4|44=999.99|54=2|55=BTCUSD|58=IOI_UNFILLED_QUANTITY|59=3|60=20180218-18:45:02.022|150=4|151=0|10=050|

HEADER
        8                   BeginString: FIX.4.4
        9                    BodyLength: 199
       34                     MsgSeqNum: 4
       35                       MsgType: ExecutionReport (8)
       49                  SenderCompID: GEMINI
       52                   SendingTime: 20180322-22:20:54.746
       56                  TargetCompID: DEV
BODY
        6                         AvgPx: 1000
       11                       ClOrdID: eSdLCsZRXiyNtbh
       14                        CumQty: 10
       17                        ExecID: 34
       37                       OrderID: 28
       38                      OrderQty: 20
       39                     OrdStatus: CANCELED (4)
       44                         Price: 999.99
       54                          Side: SELL (2)
       55                        Symbol: BTCUSD
       58                          Text: IOI_UNFILLED_QUANTITY
       59                   TimeInForce: IMMEDIATE_OR_CANCEL (3)
       60                  TransactTime: 20180218-18:45:02.022
      150                      ExecType: CANCELED (4)
      151                     LeavesQty: 0
TRAILER
       10                      CheckSum: 050

REST

Placing the IOI

Use the REST New Order endpoint to place an IOI by specifying the indication-of-interest execution option.

import json
import time
import base64
import hmac
from hashlib import sha384
import requests

url = base_url + '/v1/order/new'__
gemini_api_secret = 'YOUR-API-SECRET'
gemini_api_key = 'YOUR-API-KEY'

# new order
# replace the sample client_order_id with YOUR client_order_id
payload = base64.b64encode(json.dumps({
    "request": "/v1/order/new",
    "nonce":  long(time.time()*100000),
    "client_order_id": 'eSdLCsZRXiyNtbh',  
    "symbol": "btcusd",
    "amount": "100",
    "min_amount": "50",
    "price": "8710.05",
    "side": "buy",
    "type": "exchange limit",
    "options": ["indication-of-interest"]
}, separators=(',', ':')))

signature = hmac.new(gemini_api_secret, payload, sha384).hexdigest()

headers = {
        'X-GEMINI-PAYLOAD': '%s' % payload,
        'X-GEMINI-APIKEY': '%s' % gemini_api_key,
        'X-GEMINI-SIGNATURE':'%s' % signature
    }

r = requests.post(url, headers=headers)
#print json.dumps(json.loads(r.text), indent=4)
print r.text

with this order status response

{
  "order_id" : "3330619289",
  "id" : "3330619289",
  "symbol" : "btcusd",
  "exchange" : "gemini",
  "avg_execution_price" : "0.00",
  "client_order_id": "eSdLCsZRXiyNtbh", 
  "side" : "buy",
  "type" : "indication-of-interest limit",
  "timestamp" : "1424285102",
  "timestampms" : 1424285102000,
  "is_live" : true,
  "is_cancelled" : false,
  "is_hidden" : true,
  "was_forced" : false,
  "executed_amount" : "0",
  "remaining_amount" : "100",
  "options" : [ "indication-of-interest" ],
  "price" : "8710.05",
  "original_amount" : "100"
}

Checking the status

Gemini recommends using our WebSocket Order Events API to get realtime notification of:

However, if using our Order Entry API is not possible, then wait one minute and check the REST: Get Past Trades endpoint for trades referencing the order_id shown in the response to the original order.

UI

Log in to https://exchange.gemini.com and use the Block Trading tab to place an IOI.

Makers

Block trade market makers receive and respond to indications of interest IOI <6> messages uaing a FIX Order Entry channel. REST and UI APIs are not available at this time.

For more information about becoming a market maker, contact bizdev@gemini.com.

Receive IOI

Once your account is set up as a block trade market maker, you will begin receiving IOI <6> messages on all your FIX Order Entry channels.

You may respond to the IOI on any channel but you will only receive execution reports on the channel that responds to the IOI. (Your drop copy channel will receive notifications of all trades; see FIX Drop Copy: Examples: Block Limit Order Filled for an example.)

In this example, the taker has placed an IOI to buy 15 BTC at a price of 1000.10 USD with a minimum fill quantity of 10 BTC.

The IOI the market maker receives has no side and the PRICE stipulation shows a collar price of 1000.0 USD, the midpoint of the continuous book at the time the order was placed:

RAW
8=FIX.4.4|9=155|35=6|34=2|49=GEMINI|52=20180408-04:33:37.296|56=TESTOE001|23=28|27=15|28=N|54=7|55=BTCUSD|62=20180408-04:34:32.016|232=2|233=MINQTY|234=10|233=PRICE|234=1000.00|10=071|

HEADER
        8                   BeginString: FIX.4.4
        9                    BodyLength: 155
       34                     MsgSeqNum: 2
       35                       MsgType: IndicationOfInterest (6)
       49                  SenderCompID: GEMINI
       52                   SendingTime: 20180408-04:33:37.296
       56                  TargetCompID: TESTOE001
BODY
       23                         IOIID: 28
       27                        IOIQty: 15
       28                  IOITransType: NEW (N)
       54                          Side: UNDISCLOSED (7)
       55                        Symbol: BTCUSD
       62                ValidUntilTime: 20180408-04:34:32.016
    NoStipulations: count = 2
          233               StipulationType: MINIMUM_QUANTITY (MINQTY)
          234              StipulationValue: 10
        ----
          233               StipulationType: PRICE_RANGE (PRICE)
          234              StipulationValue: 1000.00
TRAILER
       10                      CheckSum: 071

Respond to IOI

Place an IOI by creating a New Order Single <D> message with:

The response must be received before the ValidUntilTime <62> timestamp. All responses are fix and cannot be cancelled or changed.

In this example, the market maker places a buy order:

RAW
8=FIX.4.4|9=145|35=D|34=2|49=TESTOE001|52=20180408-04:33:37.466|56=GEMINI|11=dessertspoonfuls|23=28|38=10|40=2|44=1000.50|54=1|55=BTCUSD|59=3|60=19700101-00:00:00.013|10=004|

HEADER
        8                   BeginString: FIX.4.4
        9                    BodyLength: 145
       34                     MsgSeqNum: 2
       35                       MsgType: NewOrderSingle (D)
       49                  SenderCompID: TESTOE001
       52                   SendingTime: 20180408-04:33:37.466
       56                  TargetCompID: GEMINI
BODY
       11                       ClOrdID: dessertspoonfuls
       23                         IOIID: 28
       38                      OrderQty: 10
       40                       OrdType: LIMIT (2)
       44                         Price: 1000.50
       54                          Side: BUY (1)
       55                        Symbol: BTCUSD
       59                   TimeInForce: IMMEDIATE_OR_CANCEL (3)
       60                  TransactTime: 20180408-04:33:37.465
TRAILER
       10                      CheckSum: 004

and receives an Execution Report <8> showing the order was accepted.

RAW
8=FIX.4.4|9=173|35=8|34=3|49=GEMINI|52=20180408-04:33:37.621|56=TESTOE001|6=0|11=dessertspoonfuls|14=0|17=31|37=30|38=10|39=0|44=1000.50|54=1|55=BTCUSD|59=3|60=20180408-04:33:37.602|150=0|151=10|10=204|

HEADER
        8                   BeginString: FIX.4.4
        9                    BodyLength: 173
       34                     MsgSeqNum: 3
       35                       MsgType: ExecutionReport (8)
       49                  SenderCompID: GEMINI
       52                   SendingTime: 20180408-04:33:37.621
       56                  TargetCompID: TESTOE001
BODY
        6                         AvgPx: 0
       11                       ClOrdID: dessertspoonfuls
       14                        CumQty: 0
       17                        ExecID: 31
       37                       OrderID: 30
       38                      OrderQty: 10
       39                     OrdStatus: NEW (0)
       44                         Price: 1000.50
       54                          Side: BUY (1)
       55                        Symbol: BTCUSD
       59                   TimeInForce: IMMEDIATE_OR_CANCEL (3)
       60                  TransactTime: 20180408-04:33:37.602
      150                      ExecType: NEW (0)
      151                     LeavesQty: 10
TRAILER
       10                      CheckSum: 204

Similarly, a sell order:

RAW
8=FIX.4.4|9=144|35=D|34=3|49=TESTOE001|52=20180408-04:33:37.630|56=GEMINI|11=quasigeostrophic|23=28|38=10|40=2|44=999.25|54=2|55=BTCUSD|59=3|60=20180408-04:33:37.622|10=210|

HEADER
        8                   BeginString: FIX.4.4
        9                    BodyLength: 144
       34                     MsgSeqNum: 3
       35                       MsgType: NewOrderSingle (D)
       49                  SenderCompID: TESTOE001
       52                   SendingTime: 20180408-04:33:37.630
       56                  TargetCompID: GEMINI
BODY
       11                       ClOrdID: quasigeostrophic
       23                         IOIID: 28
       38                      OrderQty: 10
       40                       OrdType: LIMIT (2)
       44                         Price: 999.25
       54                          Side: SELL (2)
       55                        Symbol: BTCUSD
       59                   TimeInForce: IMMEDIATE_OR_CANCEL (3)
       60                  TransactTime: 20180408-04:33:37.622
TRAILER
       10                      CheckSum: 210

Which is also accepted:

RAW
8=FIX.4.4|9=172|35=8|34=4|49=GEMINI|52=20180408-04:33:37.634|56=TESTOE001|6=0|11=quasigeostrophic|14=0|17=33|37=32|38=10|39=0|44=999.25|54=2|55=BTCUSD|59=3|60=20180408-04:33:37.615|150=0|151=10|10=161|

HEADER
        8                   BeginString: FIX.4.4
        9                    BodyLength: 172
       34                     MsgSeqNum: 4
       35                       MsgType: ExecutionReport (8)
       49                  SenderCompID: GEMINI
       52                   SendingTime: 20180408-04:33:37.634
       56                  TargetCompID: TESTOE001
BODY
        6                         AvgPx: 0
       11                       ClOrdID: quasigeostrophic
       14                        CumQty: 0
       17                        ExecID: 33
       37                       OrderID: 32
       38                      OrderQty: 10
       39                     OrdStatus: NEW (0)
       44                         Price: 999.25
       54                          Side: SELL (2)
       55                        Symbol: BTCUSD
       59                   TimeInForce: IMMEDIATE_OR_CANCEL (3)
       60                  TransactTime: 20180408-04:33:37.615
      150                      ExecType: NEW (0)
      151                     LeavesQty: 10
TRAILER
       10                      CheckSum: 161

Block Trade Executes

At the end of one minute, the block trading engine will auto-match the IOI against all the market makers' orders. The market makers then receive execution reports indicating whether their orders were filled, partially filled, or cancelled. No quantity remains.

In this example, the sell order is completely filled:

RAW
8=FIX.4.4|9=224|35=8|34=5|49=GEMINI|52=20180408-04:33:37.694|56=TESTOE001|6=999.25|11=quasigeostrophic|12=0.000000|13=3|14=10|17=35|31=999.25|32=10|37=32|38=10|39=2|44=999.25|54=2|55=BTCUSD|59=3|60=20150218-18:45:02.023|150=F|151=0|479=USD|851=1|10=135|

HEADER
        8                   BeginString: FIX.4.4
        9                    BodyLength: 224
       34                     MsgSeqNum: 5
       35                       MsgType: ExecutionReport (8)
       49                  SenderCompID: GEMINI
       52                   SendingTime: 20180408-04:33:37.694
       56                  TargetCompID: TESTOE001
BODY
        6                         AvgPx: 999.25
       11                       ClOrdID: quasigeostrophic
       12                    Commission: 0.000000
       13                      CommType: ABSOLUTE (3)
       14                        CumQty: 10
       17                        ExecID: 35
       31                        LastPx: 999.25
       32                       LastQty: 10
       37                       OrderID: 32
       38                      OrderQty: 10
       39                     OrdStatus: FILLED (2)
       44                         Price: 999.25
       54                          Side: SELL (2)
       55                        Symbol: BTCUSD
       59                   TimeInForce: IMMEDIATE_OR_CANCEL (3)
       60                  TransactTime: 20180408-04:33:37.694
      150                      ExecType: TRADE (F)
      151                     LeavesQty: 0
      479                  CommCurrency: USD
      851              LastLiquidityInd: ADDED_LIQUIDITY (1)
TRAILER
       10                      CheckSum: 135


The buy order is cancelled:

RAW
8=FIX.4.4|9=205|35=8|34=6|49=GEMINI|52=20180408-04:33:37.705|56=TESTOE001|6=0|11=dessertspoonfuls|14=0|17=38|37=30|38=10|39=4|44=1000.50|54=1|55=BTCUSD|58=BLOCK_TRADE_UNFILLED_QUANTITY|59=3|60=20150218-18:45:02.026|150=4|151=0|10=031|

HEADER
        8                   BeginString: FIX.4.4
        9                    BodyLength: 205
       34                     MsgSeqNum: 6
       35                       MsgType: ExecutionReport (8)
       49                  SenderCompID: GEMINI
       52                   SendingTime: 20180408-04:33:37.705
       56                  TargetCompID: TESTOE001
BODY
        6                         AvgPx: 0
       11                       ClOrdID: dessertspoonfuls
       14                        CumQty: 0
       17                        ExecID: 38
       37                       OrderID: 30
       38                      OrderQty: 10
       39                     OrdStatus: CANCELED (4)
       44                         Price: 1000.50
       54                          Side: BUY (1)
       55                        Symbol: BTCUSD
       58                          Text: BLOCK_TRADE_UNFILLED_QUANTITY
       59                   TimeInForce: IMMEDIATE_OR_CANCEL (3)
       60                  TransactTime:  20180408-04:33:37.705
      150                      ExecType: CANCELED (4)
      151                     LeavesQty: 0
TRAILER
       10                      CheckSum: 031

Market data

When an IOI executes and one or more fills on a block trade occur, the participants will be informed immediately.

Ten minutes afterward, a single entry will print to Gemini public market data showing:

Gemini do not publicly disclose any of the following:

Public market data on block trades is available via FIX, WebSocket, and REST APIs.

FIX

To receive block trade notifications via FIX, make a Market Data Request <V> that includes MDEntryType <269> with value 2 = Trade in the NoMDEntryTypes <267> group.

Sample notification shown in FIX Market Data: Examples: Block Trades.

WebSocket

An established market data subscription will receive block trade events. See WebSocket Market Data: Block Trade Event for more information.

{
   "type":"update",
   "eventId":1111597035,
   "socket_sequence":8,
   "timestamp":1501175027,
   "timestampms":1501175027304,
   "events":[
      {
         "type":"block_trade",
         "tid":1111597035,
         "price":"10100.00",
         "amount":"1000"
      }
   ]
}

REST

Block trades appear in the REST: Trade History endpoint with type set to block.

[
   {
      "timestamp":1523049820,
      "timestampms":1523049820790,
      "tid":334450985,
      "price":"6659.99",
      "amount":"20",
      "exchange":"gemini",
      "type":"block"
   },
   {
      "timestamp":1523049744,
      "timestampms":1523049744076,
      "tid":334450970,
      "price":"6660.03",
      "amount":"10",
      "exchange":"gemini",
      "type":"block"
   }, 
   ...
]

Revision History

Date Notes
2018/04/06 Initial Block Trade API documentation

© Copyright 2018 Gemini Trust Company, LLC.