Skip to main content
POST
/
api
/
orders
Create signed order
curl --request POST \
  --url https://api-testnet.mayybee.com/api/orders \
  --header 'Content-Type: application/json' \
  --data '
{
  "maker": "0x7aDB49aE5DF789EE9B9F82614609967cCe4eE23d",
  "tokenId": "25930605474857043641926317989588861972412542680030529942514995269236952683597",
  "makerAmount": "10000000000000000000",
  "takerAmount": "20000000000000000000",
  "marketId": "jd7ay8vzqtcsyj48zyapp6aa9h7yfq2d",
  "signature": "0x1234567890abcdef...",
  "signer": "<string>",
  "side": 0,
  "signatureType": 1,
  "expiration": 1704153600,
  "feeRateBps": 0,
  "salt": "1704067200123abc",
  "nonce": "0",
  "taker": "0x0000000000000000000000000000000000000000"
}
'
{
  "success": true,
  "orderId": "<string>",
  "matched": true,
  "trades": [
    {
      "id": "<string>",
      "price": 123,
      "size": "<string>",
      "txHash": "<string>"
    }
  ]
}

Body

application/json
maker
string
required

Wallet address that owns the tokens being traded. Must be a valid Ethereum address (0x + 40 hex chars).

Example:

"0x7aDB49aE5DF789EE9B9F82614609967cCe4eE23d"

tokenId
string
required

ERC1155 token ID for the outcome token (YES or NO). Get this from the market's conditionId calculation.

Example:

"25930605474857043641926317989588861972412542680030529942514995269236952683597"

makerAmount
string
required

Amount the maker is providing, in wei (18 decimals). For BUY: collateral amount. For SELL: token amount.

Example:

"10000000000000000000"

takerAmount
string
required

Amount the maker wants to receive, in wei (18 decimals). For BUY: token amount. For SELL: collateral amount.

Example:

"20000000000000000000"

marketId
string
required

Unique market identifier from Convex database. Used to route orders to correct orderbook.

Example:

"jd7ay8vzqtcsyj48zyapp6aa9h7yfq2d"

signature
string
required

EIP-712 signature of the order struct. Must be signed by the signer address. Format: 0x + 130 hex chars.

Example:

"0x1234567890abcdef..."

signer
string

Address that signed the EIP-712 order. Usually same as maker, but can be a delegate.

side
enum<integer>

Order side: 0 = BUY (pay collateral, get tokens), 1 = SELL (sell tokens, get collateral).

Available options:
0,
1
Example:

0

signatureType
enum<integer>
default:1

Signature type: 0 = EOA signature, 1 = EIP-712 typed signature (recommended).

Available options:
0,
1
expiration
integer

Unix timestamp (seconds) when the order expires. Expired orders are automatically rejected.

Example:

1704153600

feeRateBps
integer
default:0

Fee rate in basis points (0.01%). 100 = 1% fee. Currently 0 for testnet.

Required range: 0 <= x <= 1000
salt
string

Unique random value to prevent order replay attacks. Usually timestamp + random string.

Example:

"1704067200123abc"

nonce
string
default:0

Order nonce for batch cancellation. Increment to cancel all orders with lower nonces.

taker
string
default:0x0000000000000000000000000000000000000000

Specific counterparty address. Use 0x0000...0000 (zero address) to allow any taker.

Response

Order created successfully

success
boolean
orderId
string
matched
boolean
trades
object[]