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-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe literal string "/v1/clearing/new"
symbol
string · requiredThe trading pair
amount
string · requiredThe amount to trade
price
string · requiredThe price
side
string · enum · requiredThe direction of the trade
Enum values:buysell
counterparty_id
stringThe counterparty ID
expires_in_hrs
integerThe number of hours until the order expires
account
stringRequired for Master API keys. The name of the account within the subaccount group.
Responses
clearing_id
stringThe clearing ID
symbol
stringThe trading pair
price
stringThe order price
amount
stringThe order amount
side
string · enumEnum values:buysellstatus
stringThe order status
timestamp
timestamp
timestampms
integerThe timestamp in milliseconds
is_confirmed
booleanWhether 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-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe literal string "/v1/clearing/status"
clearing_id
string · requiredThe clearing ID
account
stringRequired for Master API keys. The name of the account within the subaccount group.
Responses
clearing_id
stringThe clearing ID
symbol
stringThe trading pair
price
stringThe order price
amount
stringThe order amount
side
string · enumEnum values:buysellstatus
stringThe order status
timestamp
timestamp
timestampms
integerThe timestamp in milliseconds
is_confirmed
booleanWhether 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-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe literal string "/v1/clearing/cancel"
clearing_id
string · requiredThe clearing ID
account
stringRequired for Master API keys. The name of the account within the subaccount group.
Responses
result
stringStatus of the cancel operation
details
stringDetailed 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-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe literal string "/v1/clearing/confirm"
clearing_id
string · requiredThe clearing ID
symbol
string · requiredThe trading pair
amount
string · requiredThe amount to trade
price
string · requiredThe price
side
string · enum · requiredThe direction of the trade
Enum values:buysell
account
stringRequired for Master API keys. The name of the account within the subaccount group.
Responses
result
stringStatus 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-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe literal string "/v1/clearing/list"
symbol
stringTrading pair
counterparty
stringcounterparty_id or counterparty_alias
side
string · enum"buy" or "sell"
Enum values:buysellexpiration_start
timestamp
expiration_end
timestamp
submission_start
timestamp
submission_end
timestamp
funded
booleanDefault value false if not set
status
stringFilter by status
timestamp
timestamp
limit_orders
integerThe maximum number of orders to return
account
stringRequired for Master API keys. The name of the account within the subaccount group.
Responses
result
stringStatus of the operation
orders
object[]
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-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe literal string "/v1/clearing/broker/list"
symbol
stringTrading pair
expiration_start
timestamp
expiration_end
timestamp
submission_start
timestamp
submission_end
timestamp
funded
booleanDefault value false if not set
status
stringFilter by status
timestamp
timestamp
limit_orders
integerThe maximum number of orders to return
account
stringRequired for Master API keys. The name of the account within the subaccount group.
Responses
result
stringStatus of the operation
orders
object[]
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-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe literal string "/v1/clearing/broker/new"
source_counterparty_id
string · requiredA symbol that corresponds with the counterparty sourcing the clearing trade
target_counterparty_id
string · requiredA symbol that corresponds with the counterparty where the clearing trade is targeted
symbol
string · requiredThe symbol of the order
amount
string · decimal · requiredQuoted decimal amount to purchase
expires_in_hrs
integer · float · requiredThe number of hours before the trade expires. Your counterparty will need to confirm the order before this time expires.
price
string · decimal · requiredQuoted decimal amount to spend per unit
side
string · enum · required"buy" or "sell". This side will be assigned to the
source_counterparty_id
. The opposite side will be sent to thetarget_counterparty_id
Enum values:buysell
account
stringRequired 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
result
stringWill return
AwaitSourceTargetConfirm
, meaning the order is waiting for both the source and the target parties to confirm the orderclearing_id
stringA 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-APIKEY
string · requiredYour API key
X-GEMINI-SIGNATURE
string · requiredHEX-encoded HMAC-SHA384 of payload signed with API secret
X-GEMINI-PAYLOAD
string · requiredBase64-encoded JSON payload
Content-Type
stringDefault: text/plainContent-Length
stringDefault: 0Cache-Control
stringDefault: no-cache
Request Body
request
string · requiredThe literal string "/v1/clearing/trades"
timestamp_nanos
integerOnly return transfers on or after this timestamp in nanos
limit_per_account
integerThe maximum number of clearing trades to return. The default is 100 and the maximum is 300.
account
stringOnly required when using a master api-key. The name of the account within the subaccount group.
symbol
stringThe trading pair
timestamp
timestamp
limit_trades
integerThe maximum number of trades to return
Responses
results
object[]