Gemini Crypto Exchange Logo
REST API

Clearing (1.0.0)

Endpoint

Create New Clearing Order

POST
https://api.gemini.com
/v1/clearing/new

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.

Create New Clearing OrderHeaders

  • X-GEMINI-APIKEYstring · required

    Your API key

  • X-GEMINI-SIGNATUREstring · required

    HEX-encoded HMAC-SHA384 of payload signed with API secret

  • X-GEMINI-PAYLOADstring · required

    Base64-encoded JSON payload

  • Content-Typestring
    Default: text/plain
  • Content-Lengthstring
    Default: 0
  • Cache-Controlstring
    Default: no-cache

Create New Clearing OrderRequest Body

  • requeststring · required

    The literal string "/v1/clearing/new"

  • noncerequired

    The nonce, as described in Private API Invocation

  • symbolstring · required

    The trading pair

  • amountstring · required

    The amount to trade

  • pricestring · required

    The price

  • sidestring · enum · required

    The direction of the trade

    Enum values:
    buy
    sell
  • counterparty_idstring

    The counterparty ID

  • expires_in_hrsinteger

    The number of hours until the order expires

  • accountstring

    Required for Master API keys. The name of the account within the subaccount group.

Create New Clearing OrderResponses

    • clearing_idstring

      The clearing ID

    • symbolstring

      The trading pair

    • pricestring

      The order price

    • amountstring

      The order amount

    • sidestring · enum
      Enum values:
      buy
      sell
    • statusstring

      The order status

    • timestamp

      timestamp

    • timestampmsinteger

      The timestamp in milliseconds

    • is_confirmedboolean

      Whether the order is confirmed


Get Clearing Order

POST
https://api.gemini.com
/v1/clearing/status

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.

Get Clearing OrderHeaders

  • X-GEMINI-APIKEYstring · required

    Your API key

  • X-GEMINI-SIGNATUREstring · required

    HEX-encoded HMAC-SHA384 of payload signed with API secret

  • X-GEMINI-PAYLOADstring · required

    Base64-encoded JSON payload

  • Content-Typestring
    Default: text/plain
  • Content-Lengthstring
    Default: 0
  • Cache-Controlstring
    Default: no-cache

Get Clearing OrderRequest Body

  • requeststring · required

    The literal string "/v1/clearing/status"

  • noncerequired

    The nonce, as described in Private API Invocation

  • clearing_idstring · required

    The clearing ID

  • accountstring

    Required for Master API keys. The name of the account within the subaccount group.

Get Clearing OrderResponses

    • clearing_idstring

      The clearing ID

    • symbolstring

      The trading pair

    • pricestring

      The order price

    • amountstring

      The order amount

    • sidestring · enum
      Enum values:
      buy
      sell
    • statusstring

      The order status

    • timestamp

      timestamp

    • timestampmsinteger

      The timestamp in milliseconds

    • is_confirmedboolean

      Whether the order is confirmed


Cancel Clearing Order

POST
https://api.gemini.com
/v1/clearing/cancel

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.

Cancel Clearing OrderHeaders

  • X-GEMINI-APIKEYstring · required

    Your API key

  • X-GEMINI-SIGNATUREstring · required

    HEX-encoded HMAC-SHA384 of payload signed with API secret

  • X-GEMINI-PAYLOADstring · required

    Base64-encoded JSON payload

  • Content-Typestring
    Default: text/plain
  • Content-Lengthstring
    Default: 0
  • Cache-Controlstring
    Default: no-cache

Cancel Clearing OrderRequest Body

  • requeststring · required

    The literal string "/v1/clearing/cancel"

  • noncerequired

    The nonce, as described in Private API Invocation

  • clearing_idstring · required

    The clearing ID

  • accountstring

    Required for Master API keys. The name of the account within the subaccount group.

Cancel Clearing OrderResponses

    • resultstring

      Status of the cancel operation

    • detailsstring

      Detailed description of the result


Confirm Clearing Order

POST
https://api.gemini.com
/v1/clearing/confirm

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.

Confirm Clearing OrderHeaders

  • X-GEMINI-APIKEYstring · required

    Your API key

  • X-GEMINI-SIGNATUREstring · required

    HEX-encoded HMAC-SHA384 of payload signed with API secret

  • X-GEMINI-PAYLOADstring · required

    Base64-encoded JSON payload

  • Content-Typestring
    Default: text/plain
  • Content-Lengthstring
    Default: 0
  • Cache-Controlstring
    Default: no-cache

Confirm Clearing OrderRequest Body

  • requeststring · required

    The literal string "/v1/clearing/confirm"

  • noncerequired

    The nonce, as described in Private API Invocation

  • clearing_idstring · required

    The clearing ID

  • symbolstring · required

    The trading pair

  • amountstring · required

    The amount to trade

  • pricestring · required

    The price

  • sidestring · enum · required

    The direction of the trade

    Enum values:
    buy
    sell
  • accountstring

    Required for Master API keys. The name of the account within the subaccount group.

Confirm Clearing OrderResponses

    • resultstring

      Status of the confirmation operation


List Clearing Orders

POST
https://api.gemini.com
/v1/clearing/list

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.

List Clearing OrdersHeaders

  • X-GEMINI-APIKEYstring · required

    Your API key

  • X-GEMINI-SIGNATUREstring · required

    HEX-encoded HMAC-SHA384 of payload signed with API secret

  • X-GEMINI-PAYLOADstring · required

    Base64-encoded JSON payload

  • Content-Typestring
    Default: text/plain
  • Content-Lengthstring
    Default: 0
  • Cache-Controlstring
    Default: no-cache

List Clearing OrdersRequest Body

  • requeststring · required

    The literal string "/v1/clearing/list"

  • noncerequired

    The nonce, as described in Private API Invocation

  • symbolstring

    Trading pair

  • counterpartystring

    counterparty_id or counterparty_alias

  • sidestring · enum

    "buy" or "sell"

    Enum values:
    buy
    sell
  • expiration_start

    timestamp

  • expiration_end

    timestamp

  • submission_start

    timestamp

  • submission_end

    timestamp

  • fundedboolean

    Default value false if not set

  • statusstring

    Filter by status

  • timestamp

    timestamp

  • limit_ordersinteger

    The maximum number of orders to return

  • accountstring

    Required for Master API keys. The name of the account within the subaccount group.

List Clearing OrdersResponses

    • resultstring

      Status of the operation

    • ordersobject[]

List Clearing Brokers

POST
https://api.gemini.com
/v1/clearing/broker/list

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.

List Clearing BrokersHeaders

  • X-GEMINI-APIKEYstring · required

    Your API key

  • X-GEMINI-SIGNATUREstring · required

    HEX-encoded HMAC-SHA384 of payload signed with API secret

  • X-GEMINI-PAYLOADstring · required

    Base64-encoded JSON payload

  • Content-Typestring
    Default: text/plain
  • Content-Lengthstring
    Default: 0
  • Cache-Controlstring
    Default: no-cache

List Clearing BrokersRequest Body

  • requeststring · required

    The literal string "/v1/clearing/broker/list"

  • noncerequired

    The nonce, as described in Private API Invocation

  • symbolstring

    Trading pair

  • expiration_start

    timestamp

  • expiration_end

    timestamp

  • submission_start

    timestamp

  • submission_end

    timestamp

  • fundedboolean

    Default value false if not set

  • statusstring

    Filter by status

  • timestamp

    timestamp

  • limit_ordersinteger

    The maximum number of orders to return

  • accountstring

    Required for Master API keys. The name of the account within the subaccount group.

List Clearing BrokersResponses

    • resultstring

      Status of the operation

    • ordersobject[]

Create New Broker Order

POST
https://api.gemini.com
/v1/clearing/broker/new

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.

Create New Broker OrderHeaders

  • X-GEMINI-APIKEYstring · required

    Your API key

  • X-GEMINI-SIGNATUREstring · required

    HEX-encoded HMAC-SHA384 of payload signed with API secret

  • X-GEMINI-PAYLOADstring · required

    Base64-encoded JSON payload

  • Content-Typestring
    Default: text/plain
  • Content-Lengthstring
    Default: 0
  • Cache-Controlstring
    Default: no-cache

Create New Broker OrderRequest Body

  • requeststring · required

    The literal string "/v1/clearing/broker/new"

  • noncerequired

    The nonce, as described in Private API Invocation

  • source_counterparty_idstring · required

    A symbol that corresponds with the counterparty sourcing the clearing trade

  • target_counterparty_idstring · required

    A symbol that corresponds with the counterparty where the clearing trade is targeted

  • symbolstring · required

    The symbol of the order

  • amountstring · decimal · required

    Quoted decimal amount to purchase

  • expires_in_hrsinteger · float · required

    The number of hours before the trade expires. Your counterparty will need to confirm the order before this time expires.

  • pricestring · decimal · required

    Quoted 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 the target_counterparty_id

    Enum values:
    buy
    sell
  • accountstring

    Required 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.

Create New Broker OrderResponses

    • resultstring

      Will return AwaitSourceTargetConfirm, meaning the order is waiting for both the source and the target parties to confirm the order

    • clearing_idstring

      A unique identifier for the clearing order.


List Clearing Trades

POST
https://api.gemini.com
/v1/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.

List Clearing TradesHeaders

  • X-GEMINI-APIKEYstring · required

    Your API key

  • X-GEMINI-SIGNATUREstring · required

    HEX-encoded HMAC-SHA384 of payload signed with API secret

  • X-GEMINI-PAYLOADstring · required

    Base64-encoded JSON payload

  • Content-Typestring
    Default: text/plain
  • Content-Lengthstring
    Default: 0
  • Cache-Controlstring
    Default: no-cache

List Clearing TradesRequest Body

  • requeststring · required

    The literal string "/v1/clearing/trades"

  • noncerequired

    The nonce, as described in Private API Invocation

  • timestamp_nanosinteger

    Only return transfers on or after this timestamp in nanos

  • limit_per_accountinteger

    The maximum number of clearing trades to return. The default is 100 and the maximum is 300.

  • accountstring

    Only required when using a master api-key. The name of the account within the subaccount group.

  • symbolstring

    The trading pair

  • timestamp

    timestamp

  • limit_tradesinteger

    The maximum number of trades to return

List Clearing TradesResponses

    • resultsobject[]