amm-instructions

Create AMM Instruction

Creates an AMM instruction, requires bearer token in authorization header.

This endpoint uses the signing format which does not require strict field ordering in the request body. Quantities and prices does not require strict precision. E.g. for asset precision of 4 - 100, 100.0, 100.00, 100.000 and 100.0000 are all accepted.

Ratelimited: True

post/v2/amm-instructions

Request

Headers

BX-SIGNATUREstring required

signature obtained using the signing format

BX-TIMESTAMPstring required

timestamp is the number of milliseconds since EPOCH

BX-NONCEstring required

nonce is a client side incremented unsigned 64 bit integer

Request body

commandTypestring required

The command type, it must be 'V3CreateAMMInstruction'

symbolstring required

market symbol. E.g. BTCUSDC

baseQuantitystring required

see asset value format

quoteQuantitystring required

see asset value format

upperBoundstring required

upper bound of price range, in quote currency

lowerBoundstring required

lower bound of price range, in quote currency

feeTierIdstring required

unique fee tier ID, see Get Market By Symbol

tradingAccountIdstring required

unique trading account ID

Example request

{
  "commandType": "V3CreateAMMInstruction",
  "symbol": {
    "$ref": "#/components/schemas/MarketSymbol/example"
  },
  "baseQuantity": "0",
  "quoteQuantity": "50000.1",
  "upperBound": "25000",
  "lowerBound": "20000",
  "feeTierId": {
    "$ref": "#/components/schemas/FeeTierId/example"
  },
  "tradingAccountId": {
    "$ref": "#/components/schemas/TradingAccountId/example"
  }
}

Response

Status OK. This means a create AMM instruction command was successfully acknowledged. It does not necessarily mean the instruction was created. To check the current status, query Get AMM Instruction by ID using the instructionId received in the response payload.

messagestring required

message

requestIdstring required
instructionIdstring required

Example response

{
  "message": "Command acknowledged - CreateAMMInstruction",
  "requestId": "633906221577404416",
  "instructionId": "633906221577404424"
}

Changes

No recorded changes to this operation across all 1 revision of this API.