const res = await fetch('https://app.trdrs.co/api/partner/accounts', {
method: 'POST',
headers: {
'content-type': 'application/json',
Authorization: `Bearer ${process.env.TRDRS_API_KEY}`,
},
body: JSON.stringify({
"accounts": [
{
"email": "trader@example.com",
"startingBalance": 50000,
"referenceId": "order-84117"
},
{
"email": "second@example.com",
"startingBalance": 100000,
"referenceId": "order-84118"
}
]
}),
})
const data = await res.json()curl -X POST 'https://app.trdrs.co/api/partner/accounts' \
-H "Authorization: Bearer $TRDRS_API_KEY" \
-H 'content-type: application/json' \
-d '{"accounts":[{"email":"trader@example.com","startingBalance":50000,"referenceId":"order-84117"},{"email":"second@example.com","startingBalance":100000,"referenceId":"order-84118"}]}'import requests
url = "https://app.trdrs.co/api/partner/accounts"
payload = { "accounts": [
{
"email": "trader@example.com",
"startingBalance": 50000,
"referenceId": "order-84117"
},
{
"email": "second@example.com",
"startingBalance": 100000,
"referenceId": "order-84118"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/partner/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accounts' => [
[
'email' => 'trader@example.com',
'startingBalance' => 50000,
'referenceId' => 'order-84117'
],
[
'email' => 'second@example.com',
'startingBalance' => 100000,
'referenceId' => 'order-84118'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trdrs.co/api/partner/accounts"
payload := strings.NewReader("{\n \"accounts\": [\n {\n \"email\": \"trader@example.com\",\n \"startingBalance\": 50000,\n \"referenceId\": \"order-84117\"\n },\n {\n \"email\": \"second@example.com\",\n \"startingBalance\": 100000,\n \"referenceId\": \"order-84118\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://app.trdrs.co/api/partner/accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounts\": [\n {\n \"email\": \"trader@example.com\",\n \"startingBalance\": 50000,\n \"referenceId\": \"order-84117\"\n },\n {\n \"email\": \"second@example.com\",\n \"startingBalance\": 100000,\n \"referenceId\": \"order-84118\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/partner/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accounts\": [\n {\n \"email\": \"trader@example.com\",\n \"startingBalance\": 50000,\n \"referenceId\": \"order-84117\"\n },\n {\n \"email\": \"second@example.com\",\n \"startingBalance\": 100000,\n \"referenceId\": \"order-84118\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"firm": "yourfirm",
"results": [
{
"referenceId": "order-84117",
"email": "trader@example.com",
"ok": true,
"accountNumber": "EVAL-7C21A9",
"balance": 50000,
"created": true
},
{
"referenceId": "order-84118",
"email": "second@example.com",
"ok": false,
"error": "no_user_with_that_email"
}
]
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Create evaluation accounts
Creates up to 20 evaluation accounts on the trdrs venue in one call. Each item names a trader by their trdrs sign-in email (the trader must already have signed up; issuing accounts never creates users), the starting balance in whole dollars, and your own referenceId for that item.
The batch answers 200 with one result per item, in order: an unknown email fails its own item (ok: false, error: no_user_with_that_email) and never voids the items around it, so check every result, not just the status code. A malformed request — bad JSON, a missing field, a duplicate referenceId within the batch — is a 400 and nothing is created, because malformed input is a pipeline bug, not a business outcome.
The trader sees the account in their trdrs account list immediately; a provision row lands on the balance ledger. Served when this deployment runs the prop engine; otherwise every route in this group answers 404.
Idempotent: per item on your referenceId — re-posting a reference your firm already used returns the original account with created: false instead of creating a second one, which is what makes the call safe to retry after a crash or timeout.
const res = await fetch('https://app.trdrs.co/api/partner/accounts', {
method: 'POST',
headers: {
'content-type': 'application/json',
Authorization: `Bearer ${process.env.TRDRS_API_KEY}`,
},
body: JSON.stringify({
"accounts": [
{
"email": "trader@example.com",
"startingBalance": 50000,
"referenceId": "order-84117"
},
{
"email": "second@example.com",
"startingBalance": 100000,
"referenceId": "order-84118"
}
]
}),
})
const data = await res.json()curl -X POST 'https://app.trdrs.co/api/partner/accounts' \
-H "Authorization: Bearer $TRDRS_API_KEY" \
-H 'content-type: application/json' \
-d '{"accounts":[{"email":"trader@example.com","startingBalance":50000,"referenceId":"order-84117"},{"email":"second@example.com","startingBalance":100000,"referenceId":"order-84118"}]}'import requests
url = "https://app.trdrs.co/api/partner/accounts"
payload = { "accounts": [
{
"email": "trader@example.com",
"startingBalance": 50000,
"referenceId": "order-84117"
},
{
"email": "second@example.com",
"startingBalance": 100000,
"referenceId": "order-84118"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.trdrs.co/api/partner/accounts",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'accounts' => [
[
'email' => 'trader@example.com',
'startingBalance' => 50000,
'referenceId' => 'order-84117'
],
[
'email' => 'second@example.com',
'startingBalance' => 100000,
'referenceId' => 'order-84118'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://app.trdrs.co/api/partner/accounts"
payload := strings.NewReader("{\n \"accounts\": [\n {\n \"email\": \"trader@example.com\",\n \"startingBalance\": 50000,\n \"referenceId\": \"order-84117\"\n },\n {\n \"email\": \"second@example.com\",\n \"startingBalance\": 100000,\n \"referenceId\": \"order-84118\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
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))
}HttpResponse<String> response = Unirest.post("https://app.trdrs.co/api/partner/accounts")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"accounts\": [\n {\n \"email\": \"trader@example.com\",\n \"startingBalance\": 50000,\n \"referenceId\": \"order-84117\"\n },\n {\n \"email\": \"second@example.com\",\n \"startingBalance\": 100000,\n \"referenceId\": \"order-84118\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.trdrs.co/api/partner/accounts")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"accounts\": [\n {\n \"email\": \"trader@example.com\",\n \"startingBalance\": 50000,\n \"referenceId\": \"order-84117\"\n },\n {\n \"email\": \"second@example.com\",\n \"startingBalance\": 100000,\n \"referenceId\": \"order-84118\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"firm": "yourfirm",
"results": [
{
"referenceId": "order-84117",
"email": "trader@example.com",
"ok": true,
"accountNumber": "EVAL-7C21A9",
"balance": 50000,
"created": true
},
{
"referenceId": "order-84118",
"email": "second@example.com",
"ok": false,
"error": "no_user_with_that_email"
}
]
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}{
"error": "invalid_instrument"
}Authorizations
A partner-scoped API key (trdrs_sk_…), issued to a trdrs Connect partner firm and accepted only under /api/partner/. Same format as the firm (tenant) key, different scope: a firm API key is refused here, and this key is refused everywhere else.
Body
PartnerAccountsCreateRequest. A batch of 1 to 20 accounts to issue on the trdrs venue; each item carries your own referenceId, so a retried batch re-answers instead of re-creating.
1 - 20 elementsShow child attributes
Show child attributes
Response
Per-item results, in request order (PartnerAccountsCreateResponse)
PartnerAccountsCreateResponse. One result per requested item, in request order. An ok: false item names its reason and never voids the items around it — check every result, not just the status code.