Version: 1.1 · Effective: 2026-09-25 · Applies to: https://yield.trdefi.com/api/ and https://yield.trdefi.com/v1/

The operating rules that apply to every client of the API. Read together with the Method of Statement (what the API is) and the Overall Scheme (the endpoints and the write path).


1 · Authentication and credentials

SurfaceCredentialNotes
Read surface (GET /api/*)NoneOpen. Rate-limited, and the limit is advertised on every reply.
Write path (POST /v1/positions)One API key, held server-side by the clientThe key prepares unsigned transactions. It cannot sign, broadcast or move value.

There is no signing grant. That is the point of the design. A signing grant would be a secret of ours that can move a client's money; instead the client signs with its own wallet and we never hold anything worth stealing. A leaked API key costs its owner a rate-limit abuse problem — never a token.

Key format

trd_live_<keyId>_<secret>

Getting a key

Request one at https://yield.trdefi.com/docs/api#access. Tell us who you are, what you are building and roughly what volume to expect. Keys are issued after a short manual review — we will not give a write key to an address we cannot reach. There is no self-service issuance, and no key is needed to read.

Scopes

Every key carries an explicit set of scopes. A request outside its scopes is refused with 403.

ScopeGrants
readRead the public catalogue. Not needed — the read surface is open — but a key that has it may be used to carry the read quota on the same credential.
preparePOST /v1/positions. The only scope that writes anything, and even it only prepares.
adminManage the organisation's own keys and webhooks. Not granted on request; issued per organisation.

A key with prepare alone cannot read the catalogue. A key with read alone cannot prepare. Request only what the integration needs.

Rules that apply to any key we issue

  1. Server-side only. Never in a browser. A key in client-side code is treated as compromised.
  2. Scoped. Bound to an organisation and to the scopes listed above.
  3. Origin-restricted. Write requests from an origin that is not on the key's allowlist are refused.
  4. Revocable at any time. Revocation takes effect immediately; a revoked key is refused on its next request.
  5. Rotatable without downtime. A client may hold two valid keys during a rotation window.
  6. We never ask for a wallet key. No endpoint, ever, accepts a private key or seed phrase.
  7. Never share a key between environments. A test key and a live key are different credentials.

2 · Environments

EnvironmentBase URLPurpose
Productionhttps://yield.trdefi.com/api, https://yield.trdefi.com/v1Live data, live positions
Testpublic test networks (trd_test_ keys)Verifying integration code before pointing at production

Read-side behaviour is identical across environments. A client should verify against the test environment first; writing integration code that only works in production is not supported. A live key refuses a test-network chain and a test key refuses a mainnet one.

3 · Request and response conventions

4 · Rate limits

Limits are enforced per credential and per bucket. Issuing more credentials does not raise them.

BucketLimitWindow
stats12060 s
badge12060 s
chains6060 s
quote6060 s
strategy-detail6060 s
strategies2060 s
prepare (POST /v1/positions)agreed per key, default 660 s

The headers are authoritative, not this table. Every reply carries:

RateLimit-Limit: 120
RateLimit-Remaining: 119
RateLimit-Reset: 42
RateLimit-Policy: stats;w=60;limit=120

5 · Idempotency and retries

6 · Errors

Every error uses one envelope:

{
  "error": {
    "code": "RATE_LIMITED",
    "message": "Rate limit exceeded for stats",
    "requestId": "9f2c1d4e7a8b3c5d6e0f1a2b3c4d5e6f",
    "retryable": true,
    "documentation": "https://yield.trdefi.com/docs/api#rate_limited"
  }
}

7 · Signature and broadcast are the client's

The write path returns unsigned transactions. Two consequences a client must accept:

8 · Webhooks

Where a client subscribes to events, the following rules apply.

9 · Versioning and deprecation

10 · Acceptable use

A client must not:

A client must:

11 · Request logging and auditing

We record one row per API request so we can operate the service and measure the service level we publish. This is what is stored:

FieldStored as
Path, method, HTTP status, latencyas observed
TimestampUTC
Client IP addresssha256(ip + salt) — the raw address is never stored
Countrycoarse, derived from the request
User agenttruncated to 200 characters
Origin / referertruncated to 200 characters
API credential idthe keyId portion only — never the secret

We do not store request bodies, query-string values, cookies, or any account data. Rows are deleted after 30 days. IPs are hashed precisely so that we can count distinct clients without holding personal data.

What a client can audit about itself: every call made with its key is attributable to the keyId in our log. Revoke a key and the abuse stops; the record of what it did remains for the retention window. That is the audit trail — it is per key, and it is why a shared key is a bad idea.

Aggregates may be used internally for capacity and SLO measurement, and may be published only in aggregate form that cannot identify a client.

12 · Fees

A position created through TRDEFI — web app or API — carries a 0.05 % protocol fee embedded in the signed order data. It is not a separate transfer and not an invoice; it executes on-chain with the position. There is no tier and no parameter that waives it, and the integrator cannot remove it.

The integrator's own commission (makerFeeBps) is theirs to set and is independent of it. Full statement: Overall Scheme, Part 7.

13 · Support

ChannelUse
info@trdefi.comAnything, including integration questions and key requests
requestId in the error envelopeAlways include it — it lets us find the exact call

Include, in every support request: the X-Request-Id, the endpoint, the exact request (redact any credential), and the response body as received.

14 · Changes to these rules

These rules may be updated. A change that materially affects an existing integration is announced with the same 90-day notice as a breaking API change. The current version is always published at

https://yield.trdefi.com/docs/general-rules with an effective date.


TRDEFI Ltd, London, United Kingdom. See also: Method of Statement, Overall Scheme.