Step 1: Build a prediction transaction
Returns an unsigned transaction that places a prediction; sign it and submit via POST /transactions/prediction/submit.
POST
/
transactions
/
prediction
Step 1: Build a prediction transaction
curl --request POST \
--url https://api.trepa.app/transactions/prediction \
--header 'Content-Type: application/json' \
--data '
{
"pool_id": "<string>",
"stake": 123,
"value": 123
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({pool_id: '<string>', stake: 123, value: 123})
};
fetch('https://api.trepa.app/transactions/prediction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({pool_id: '<string>', stake: 123, value: 123})
};
fetch('https://api.trepa.app/transactions/prediction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trepa.app/transactions/prediction"
payload = {
"pool_id": "<string>",
"stake": 123,
"value": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.trepa.app/transactions/prediction"
payload := strings.NewReader("{\n \"pool_id\": \"<string>\",\n \"stake\": 123,\n \"value\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"transaction": "<string>",
"proof": "<string>"
}Last modified on August 12, 2026
⌘I
Step 1: Build a prediction transaction
curl --request POST \
--url https://api.trepa.app/transactions/prediction \
--header 'Content-Type: application/json' \
--data '
{
"pool_id": "<string>",
"stake": 123,
"value": 123
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({pool_id: '<string>', stake: 123, value: 123})
};
fetch('https://api.trepa.app/transactions/prediction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({pool_id: '<string>', stake: 123, value: 123})
};
fetch('https://api.trepa.app/transactions/prediction', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.trepa.app/transactions/prediction"
payload = {
"pool_id": "<string>",
"stake": 123,
"value": 123
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.trepa.app/transactions/prediction"
payload := strings.NewReader("{\n \"pool_id\": \"<string>\",\n \"stake\": 123,\n \"value\": 123\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"transaction": "<string>",
"proof": "<string>"
}