Predict API (Beta)
  1. OAuth
Predict API (Beta)
  • FAQs
  • Guides
    • Understanding the Orderbook
    • How to authenticate your API requests
    • How to create or cancel orders
  • Authorization
    • Get auth message
      GET
    • Get JWT with valid signature
      POST
  • Orders
    • Get order by hash
      GET
    • Get orderbook for specific market
      GET
    • Get orders
      GET
    • Create an order
      POST
    • Optimistically cancel orders
      POST
  • Categories
    • Get categories
      GET
    • Get category by slug
      GET
  • Markets
    • Get markets
      GET
    • Get market statistics
      GET
    • Get market last sale information
      GET
    • Get market activity
      GET
  • Positions
    • Get your positions
      GET
  • Season
    • Get leaderboard
    • Get season totals
  • Blast
    • Blast multiplier addresses
  • OAuth
    • Finalize a OAuth connection
      POST
    • Get the orders for a OAuth connection
      POST
    • Create an order for a OAuth connection
      POST
    • Cancel the orders for a OAuth connection
      POST
    • Get the positions for a OAuth connection
      POST
  • ZeroDev
    • Validate a user op
  1. OAuth

Create an order for a OAuth connection

POST
/oauth/orders/create
OAuth

Request

Body Params application/json
signer
string 
required
a string
account
string 
required
a string
signature
string 
required
a string
data
object 
required
timestamp
integer 
required
an integer
pricePerShare
string 
required
A numeric string for the price per share
strategy
enum<string> 
required
Allowed values:
LIMITMARKET
slippageBps
string 
optional
a non empty string
>= 1 characters
order
object 
required
Example
{
  "signer": "string",
  "account": "string",
  "signature": "string",
  "data": {
    "timestamp": 0,
    "pricePerShare": "string",
    "strategy": "LIMIT",
    "slippageBps": "string",
    "order": {
      "hash": "string",
      "salt": "string",
      "maker": "string",
      "signer": "string",
      "taker": "0x0000000000000000000000000000000000000000",
      "tokenId": "string",
      "makerAmount": "string",
      "takerAmount": "string",
      "expiration": "string",
      "nonce": "string",
      "feeRateBps": "string",
      "side": 0,
      "signatureType": 0
    }
  }
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api-sepolia.predict.fun/oauth/orders/create' \
--header 'Content-Type: application/json' \
--data-raw '{
    "signer": "string",
    "account": "string",
    "signature": "string",
    "data": {
        "timestamp": 0,
        "pricePerShare": "string",
        "strategy": "LIMIT",
        "slippageBps": "string",
        "order": {
            "hash": "string",
            "salt": "string",
            "maker": "string",
            "signer": "string",
            "taker": "0x0000000000000000000000000000000000000000",
            "tokenId": "string",
            "makerAmount": "string",
            "takerAmount": "string",
            "expiration": "string",
            "nonce": "string",
            "feeRateBps": "string",
            "side": 0,
            "signatureType": 0
        }
    }
}'

Responses

🟢200OK
application/json
Response 200
Body
success
boolean 
required
a boolean
data
object 
required
code
enum<string> 
required
Allowed value:
OK
Example
{
  "success": true,
  "data": {
    "code": "OK"
  }
}
Previous
Get the orders for a OAuth connection
Next
Cancel the orders for a OAuth connection
Built with