Skip to main content
POST
/
api
/
orders
/
gasless
curl --request POST \ --url https://api-testnet.mayybee.com/api/orders/gasless \ --header 'Content-Type: application/json' \ --data ' { "maker": "0xYourEOAAddress", "smartWallet": "0xYourSmartWalletAddress", "tokenId": "25930605474857043641926317989588861972412542680030529942514995269236952683597", "side": 0, "price": 50, "size": "10000000000000000000", "marketId": "jd7ay8vzqtcsyj48zyapp6aa9h7yfq2d" } '
{
  "success": true,
  "orderId": "ord_1704067200_abc123",
  "matched": true,
  "tradesCount": 1,
  "message": "Order created without user signature!"
}

Body

application/json

Input for creating a gasless order. The backend signs and executes the order on behalf of the user - no wallet signature required!

maker
string
required

Your EOA wallet address. This address holds ERC1155 outcome tokens (for SELL orders) or receives them (for BUY orders).

Example:

"0x7aDB49aE5DF789EE9B9F82614609967cCe4eE23d"

tokenId
string
required

ERC1155 token ID for the outcome token you want to trade. This is a large integer (up to 78 digits) as a decimal string.

Example:

"25930605474857043641926317989588861972412542680030529942514995269236952683597"

side
enum<integer>
required

Order direction. 0 = BUY (pay collateral, receive outcome tokens). 1 = SELL (sell outcome tokens, receive collateral).

Available options:
0,
1
Example:

0

price
number
required

Price per token in cents (1-99). Prediction market prices represent probability. 50 cents = 50% implied probability.

Required range: 1 <= x <= 99
Example:

50

size
string
required

Number of tokens in wei (18 decimals). Example: '10000000000000000000' = 10 tokens. Min: 0.1 tokens. Max: 1M tokens.

Example:

"10000000000000000000"

marketId
string
required

Market identifier from Convex database. This routes your order to the correct orderbook.

Example:

"jd7ay8vzqtcsyj48zyapp6aa9h7yfq2d"

smartWallet
string

Your Smart Wallet address (optional). For hybrid model: Smart Wallet holds wUSDT collateral while EOA holds ERC1155 tokens.

Example:

"0x1234567890abcdef1234567890abcdef12345678"

Response

Order created successfully

Response returned after creating a gasless order. Contains order ID and matching status.

success
boolean

Whether the order was successfully created and added to the orderbook. True even if not immediately matched.

orderId
string

Unique order identifier in format ord_{timestamp}_{random}. Use this to track or cancel the order.

Example:

"ord_1704067200_abc123"

matched
boolean

Whether the order was immediately matched against existing orders. If false, order sits in orderbook.

tradesCount
integer

Number of trades executed if order was matched. 0 if order is resting in orderbook.

Required range: x >= 0
message
string

Human-readable status message describing what happened.