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
  • Accounts
    • Get connected account
      GET
    • Set a referral
      POST
  • Orders
    • Get order by hash
      GET
    • Get orders
      GET
    • Create an order
      POST
    • Remove orders from the orderbook
      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 the orderbook for a market
      GET
  • Positions
    • Get positions
  • 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
  1. OAuth

Create an order for a OAuth connection

Developing
POST
/v1/oauth/orders/create
[This endpoint is not public]

Request

Authorization
Bearer Token
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
or
API Key
Add parameter in header
x-api-key
Example:
x-api-key: ********************
or
Body Params application/jsonRequired

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 Code 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-testnet.predict.fun/v1/oauth/orders/create' \
--header 'Authorization: Bearer <token>' \
--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

🟢201
application/json
Response 201
Body

Example
{
    "success": true,
    "data": {
        "code": "OK"
    }
}
Modified at 2025-12-11 01:33:41
Previous
Get the orders for a OAuth connection
Next
Cancel the orders for a OAuth connection
Built with