Create New Clearing Order
Roles
The API key you use to access this endpoint must have the Trader role assigned. See Roles for more information.
The OAuth scope must have clearing:create assigned to access this endpoint. See OAuth Scopes for more information.
Headers
X-GEMINI-APIKEYstring · requiredYour API key
X-GEMINI-SIGNATUREstring · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring · requiredBase64-encoded JSON payload
Content-TypestringDefault: text/plainContent-LengthstringDefault: 0Cache-ControlstringDefault: no-cache
Request Body
requeststring · requiredThe literal string "/v1/clearing/new"
symbolstring · requiredThe trading pair
amountstring · requiredThe amount to trade
pricestring · requiredThe price
sidestring · enum · requiredThe direction of the trade
Enum values:buysell
counterparty_idstringThe counterparty ID
expires_in_hrsintegerThe number of hours until the order expires
accountstringRequired for Master API keys. The name of the account within the subaccount group.
Responses
Successful operation
clearing_idstringThe clearing ID
symbolstringThe trading pair
pricestringThe order price
amountstringThe order amount
sidestring · enumEnum values:buysellstatusstringThe order status
timestamptimestamp
timestampmsintegerThe timestamp in milliseconds
is_confirmedbooleanWhether the order is confirmed
Get Clearing Order
Roles
The API key you use to access this endpoint must have the Trader role assigned. See Roles for more information.
The OAuth scope must have clearing:read assigned to access this endpoint. See OAuth Scopes for more information.
Headers
X-GEMINI-APIKEYstring · requiredYour API key
X-GEMINI-SIGNATUREstring · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring · requiredBase64-encoded JSON payload
Content-TypestringDefault: text/plainContent-LengthstringDefault: 0Cache-ControlstringDefault: no-cache
Request Body
requeststring · requiredThe literal string "/v1/clearing/status"
clearing_idstring · requiredThe clearing ID
accountstringRequired for Master API keys. The name of the account within the subaccount group.
Responses
Successful operation
clearing_idstringThe clearing ID
symbolstringThe trading pair
pricestringThe order price
amountstringThe order amount
sidestring · enumEnum values:buysellstatusstringThe order status
timestamptimestamp
timestampmsintegerThe timestamp in milliseconds
is_confirmedbooleanWhether the order is confirmed
Cancel Clearing Order
Roles
The API key you use to access this endpoint must have the Trader role assigned. See Roles for more information.
The OAuth scope must have clearing:create assigned to access this endpoint. See OAuth Scopes for more information.
Headers
X-GEMINI-APIKEYstring · requiredYour API key
X-GEMINI-SIGNATUREstring · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring · requiredBase64-encoded JSON payload
Content-TypestringDefault: text/plainContent-LengthstringDefault: 0Cache-ControlstringDefault: no-cache
Request Body
requeststring · requiredThe literal string "/v1/clearing/cancel"
clearing_idstring · requiredThe clearing ID
accountstringRequired for Master API keys. The name of the account within the subaccount group.
Responses
Successful operation
resultstringStatus of the cancel operation
detailsstringDetailed description of the result
Confirm Clearing Order
Roles
The API key you use to access this endpoint must have the Trader role assigned. See Roles for more information.
The OAuth scope must have clearing:create assigned to access this endpoint. See OAuth Scopes for more information.
Headers
X-GEMINI-APIKEYstring · requiredYour API key
X-GEMINI-SIGNATUREstring · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring · requiredBase64-encoded JSON payload
Content-TypestringDefault: text/plainContent-LengthstringDefault: 0Cache-ControlstringDefault: no-cache
Request Body
requeststring · requiredThe literal string "/v1/clearing/confirm"
clearing_idstring · requiredThe clearing ID
symbolstring · requiredThe trading pair
amountstring · requiredThe amount to trade
pricestring · requiredThe price
sidestring · enum · requiredThe direction of the trade
Enum values:buysell
accountstringRequired for Master API keys. The name of the account within the subaccount group.
Responses
Successful operation
resultstringStatus of the confirmation operation
List Clearing Orders
Roles
The API key you use to access this endpoint must have the Trader role assigned. See Roles for more information.
The OAuth scope must have clearing:read assigned to access this endpoint. See OAuth Scopes for more information.
Headers
X-GEMINI-APIKEYstring · requiredYour API key
X-GEMINI-SIGNATUREstring · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring · requiredBase64-encoded JSON payload
Content-TypestringDefault: text/plainContent-LengthstringDefault: 0Cache-ControlstringDefault: no-cache
Request Body
requeststring · requiredThe literal string "/v1/clearing/list"
symbolstringTrading pair
counterpartystringcounterparty_id or counterparty_alias
sidestring · enum"buy" or "sell"
Enum values:buysellexpiration_startUTC timestamp. Requires
expiration_endif setexpiration_endUTC timestamp. Requires
expiration_startif setsubmission_startUTC timestamp. Requires
submission_endif setsubmission_endUTC timestamp. Requires
submission_startif setfundedbooleanDefault value false if not set
statusstringFilter by status
timestampOnly return orders after this timestamp
limit_ordersintegerThe maximum number of orders to return
accountstringRequired for Master API keys. The name of the account within the subaccount group.
Responses
Successful operation
resultstringStatus of the operation
ordersobject[]
List Clearing Brokers
Roles
The API key you use to access this endpoint must have the Trader role assigned. See Roles for more information.
The OAuth scope must have clearing:read assigned to access this endpoint. See OAuth Scopes for more information.
Headers
X-GEMINI-APIKEYstring · requiredYour API key
X-GEMINI-SIGNATUREstring · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring · requiredBase64-encoded JSON payload
Content-TypestringDefault: text/plainContent-LengthstringDefault: 0Cache-ControlstringDefault: no-cache
Request Body
requeststring · requiredThe literal string "/v1/clearing/broker/list"
symbolstringTrading pair
expiration_startUTC timestamp. Requires
expiration_endif setexpiration_endUTC timestamp. Requires
expiration_startif setsubmission_startUTC timestamp. Requires
submission_endif setsubmission_endUTC timestamp. Requires
submission_startif setfundedbooleanDefault value false if not set
statusstringFilter by status
timestampOnly return orders after this timestamp
limit_ordersintegerThe maximum number of orders to return
accountstringRequired for Master API keys. The name of the account within the subaccount group.
Responses
Successful operation
resultstringStatus of the operation
ordersobject[]
Create New Broker Order
Gemini Clearing also allows for brokers to facilitate trades between two Gemini customers. A broker can submit a new Gemini Clearing order that must then be confirmed by each counterparty before settlement.
Headers
X-GEMINI-APIKEYstring · requiredYour API key
X-GEMINI-SIGNATUREstring · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring · requiredBase64-encoded JSON payload
Content-TypestringDefault: text/plainContent-LengthstringDefault: 0Cache-ControlstringDefault: no-cache
Request Body
requeststring · requiredThe literal string "/v1/clearing/broker/new"
source_counterparty_idstring · requiredA symbol that corresponds with the counterparty sourcing the clearing trade
target_counterparty_idstring · requiredA symbol that corresponds with the counterparty where the clearing trade is targeted
symbolstring · requiredThe symbol of the order
amountstring · decimal · requiredQuoted decimal amount to purchase
expires_in_hrsinteger · float · requiredThe number of hours before the trade expires. Your counterparty will need to confirm the order before this time expires.
pricestring · decimal · requiredQuoted decimal amount to spend per unit
sidestring · enum · required"buy" or "sell". This side will be assigned to the
source_counterparty_id. The opposite side will be sent to thetarget_counterparty_idEnum values:buysell
accountstringRequired for Master API keys as described in Private API Invocation. The name of the account within the subaccount group. Specifies the broker account on which to place the order. Only available for exchange accounts.
Responses
Successful operation
resultstringWill return
AwaitSourceTargetConfirm, meaning the order is waiting for both the source and the target parties to confirm the orderclearing_idstringA unique identifier for the clearing order.
List Clearing Trades
Roles
The API key you use to access this endpoint must have the Trader role assigned. See Roles for more information.
The OAuth scope must have clearing:read assigned to access this endpoint. See OAuth Scopes for more information.
Headers
X-GEMINI-APIKEYstring · requiredYour API key
X-GEMINI-SIGNATUREstring · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOADstring · requiredBase64-encoded JSON payload
Content-TypestringDefault: text/plainContent-LengthstringDefault: 0Cache-ControlstringDefault: no-cache
Request Body
requeststring · requiredThe literal string "/v1/clearing/trades"
timestamp_nanosintegerOnly return transfers on or after this timestamp in nanos
limit_per_accountintegerThe maximum number of clearing trades to return. The default is 100 and the maximum is 300.
accountstringOnly required when using a master api-key. The name of the account within the subaccount group.
symbolstringThe trading pair
timestampOnly return trades after this timestamp
limit_tradesintegerThe maximum number of trades to return
Responses
Successful operation
resultsobject[]

