API Docs
Creates a new Rune order with the specified details. If webhookUrl is provided, a webhookSecretToken will be sent in the response. webhookSecretToken is a shared secret between the server and the user. It is the only way to authenticate the incoming webhooks. It is unique for every order. webhookSecretToken should be saved by the user in the database and checked on every received webhook.
API key for authentication.
your-api-keyThe amount for the order.
1The token for the order.
SHITCOINPARADISEThe webhook URL for the order.
https://webhook.site/f5a2dcec-b7e4-4845-92d1-22ded0057104The additional fee for the order.
0The description for the order.
e14fefbe-fc23-40a2-b0d6-6aab7bff3438Successfully created the order.
Bad request. Invalid input parameters.
Internal server error.
POST /tokenpay/user/order/rune HTTP/1.1
Host: api.ordinalsbot.com
x-api-key: your-api-key
Content-Type: application/json
Accept: */*
Content-Length: 183
{
"amount": 1,
"token": "SHITCOINPARADISE",
"webhookUrl": "https://webhook.site/f5a2dcec-b7e4-4845-92d1-22ded0057104",
"additionalFee": 0,
"description": "e14fefbe-fc23-40a2-b0d6-6aab7bff3438"
}{
"id": "b15ad7f6-b34a-4a1e-8c0f-30492610a3d6",
"createdAt": 1730120609939,
"accountId": "ordinalsbot",
"feeCharge": {
"amount": 100,
"token": "BTC",
"address": "bc1qd0a0kq9hdmem24x229s7pytgp759et7takws72",
"state": "pending_payment",
"protocol": "bitcoin",
"txid": null,
"createdAt": 1730120609719,
"additionalFee": 100
},
"tokenCharge": {
"amount": 1,
"token": "SHITCOIN•PARADISE",
"address": "bc1prhdced0h23ppfvqqk2pe5k092u5ncev8rmvvlz6h5kvezcd2g93qfjmg9v",
"state": "pending_payment",
"protocol": "rune",
"txid": null,
"createdAt": 1730120609939,
"additionalFee": 0
},
"webhookUrl": "https://api.ordinalsbot.com/webhook/tokenpay",
"successUrl": null,
"state": "pending",
"description": "56f3f01e-407b-4099-b172-591501f7129d",
"webhookSecretToken": "c051a42521ab8d2987c3626a6246d99f8a3397cd6be626ee0eeb7f5457e92432"
}The transaction ID to be validated.
1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdefA successful response
POST /tokenpay/utils/checktx HTTP/1.1
Host: api.ordinalsbot.com
Content-Type: application/json
Accept: */*
Content-Length: 75
{
"txid": "1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
}A successful response
{
"txid": "f358178f7f72a07cb983da3b19097a5b8a8160b367609701d3d1c15e7f3147e4"
}Fetches an order from the Firestore database using the provided order ID.
The ID of the order to retrieve.
1234567890abcdefSuccessfully retrieved the order.
Order not found.
GET /tokenpay/order/{orderId} HTTP/1.1
Host: api.ordinalsbot.com
Accept: */*
{
"createdAt": 1721745751531,
"accountId": "ordinalsbot",
"feeCharge": {
"createdAt": 1721745751432,
"additionalFee": 23315,
"amount": 32315,
"protocol": "bitcoin",
"address": "bc1qh3rp2pns6nrr8mhx0rlzd5kktwm33wc4ax0h4y",
"txid": null,
"state": "pending_payment",
"token": "BTC"
},
"description": "e14fefbe-fc23-40a2-b0d6-6aab7bff3438",
"id": "f2bcddd4-bd8d-4c88-bf8a-61be0d5b0600",
"state": "pending",
"tokenCharge": {
"createdAt": 1721745751530,
"additionalFee": 0,
"amount": 1,
"protocol": "rune",
"address": "bc1p76ppg0q24p2v6faxkaffrvtg0n9u2wvgjzr2g48nfnhk6z7g8wasnwtsql",
"txid": null,
"state": "pending_payment",
"token": "SHITCOINPARADISE"
},
"webhookUrl": "https://webhook.site/f5a2dcec-b7e4-4845-92d1-22ded0057104"
}Withdraws funds from the user's account to the specified address.
API key for authentication.
your-api-keyThe protocol for the withdrawal.
bitcoinThe token for the withdrawal.
BTCThe amount to withdraw.
0.5The address to withdraw to.
bc1qh3rp2pns6nrr8mhx0rlzd5kktwm33wc4ax0h4ySuccessfully created the withdrawal request.
Bad request. Invalid input parameters.
Internal server error.
POST /tokenpay/user/account/withdraw HTTP/1.1
Host: api.ordinalsbot.com
x-api-key: your-api-key
Content-Type: application/json
Accept: */*
Content-Length: 104
{
"protocol": "bitcoin",
"token": "BTC",
"amount": 0.5,
"address": "bc1qh3rp2pns6nrr8mhx0rlzd5kktwm33wc4ax0h4y"
}{
"id": "f2bcddd4-bd8d-4c88-bf8a-61be0d5b0600",
"accountId": "user123",
"protocol": "bitcoin",
"token": "BTC",
"amount": 0.5,
"address": "bc1qh3rp2pns6nrr8mhx0rlzd5kktwm33wc4ax0h4y",
"state": "pending",
"createdAt": 1721745751531
}Retrieves the details of a specific withdrawal using the withdrawal ID.
The ID of the withdrawal to retrieve.
f2bcddd4-bd8d-4c88-bf8a-61be0d5b0600API key for authentication.
your-api-keySuccessfully retrieved the withdrawal details.
Bad request. Invalid input parameters.
Withdrawal not found.
Internal server error.
GET /tokenpay/user/withdrawal/{withdrawalId} HTTP/1.1
Host: api.ordinalsbot.com
x-api-key: your-api-key
Accept: */*
{
"id": "f2bcddd4-bd8d-4c88-bf8a-61be0d5b0600",
"accountId": "user123",
"protocol": "bitcoin",
"token": "BTC",
"amount": 0.5,
"address": "bc1qh3rp2pns6nrr8mhx0rlzd5kktwm33wc4ax0h4y",
"state": "completed",
"createdAt": 1721745751531
}Handles the creation of a payment PSBT.
The ID of the order.
order123The payment address.
1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNaThe payment public key.
02b463a1e6b8e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1The ordinal address.
bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kygt080The ordinal public key.
03b463a1e6b8e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1The fee rate for the transaction.
0.0001Successfully created the payment PSBT.
Bad request. Invalid input parameters.
Internal server error.
POST /tokenpay/create-payment-psbt HTTP/1.1
Host: api.ordinalsbot.com
Content-Type: application/json
Accept: */*
Content-Length: 327
{
"orderId": "order123",
"paymentAddress": "1A1zP1eP5QGefi2DMPTfTL5SLmv7DivfNa",
"paymentPublicKey": "02b463a1e6b8e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1",
"ordinalAddress": "bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kygt080",
"ordinalPublicKey": "03b463a1e6b8e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1e1a1",
"feeRate": 0.0001
}{
"psbt": "cHNidP8BAFICAAAA..."
}Retrieves the balance of a specific user account.
API key for authentication.
your-api-keySuccessfully retrieved the account balance.
Bad request. Invalid input parameters.
Account not found.
Internal server error.
GET /tokenpay/user/account/balance HTTP/1.1
Host: api.ordinalsbot.com
x-api-key: your-api-key
Accept: */*
{
"bitcoin": {
"BTC": 0
},
"rune": {
"XRUNE": 10
}
}Last updated

