Documentation Index¶
Fetch the complete documentation index at: https://makakoo-traylinx-35.mintlify.app/llms.txt Use this file to discover all available pages before exploring further.
Wallet Service¶
Wallet management, transactions, and balance API operations.
The Wallet service manages multi-entity wallets for users, organizations, and projects. It is served by the Wallets microservice, configured via REACT_APP_WALLETS_API_BASE_URL (falls back to REACT_APP_ORGANIZATIONS_API_BASE_URL).
All requests require Api-Key and Authorization: Bearer <token> headers.
List Wallets¶
http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets
Return all wallets accessible to the authenticated user, across all entity types (personal, organization, project, agent).
```bash theme={null}
curl https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets \
-H "Authorization: Bearer <ParamField query="entity_type" type="string">
Filter by entity type: `user`, `organization`, `project`.
</ParamField>
<ResponseField name="data" type="array">
Array of wallet objects.
<Expandable title="Wallet object">
<ResponseField name="id" type="string">
The wallet’s unique ID.
</ResponseField>
<ResponseField name="attributes.addressHash" type="string">
The wallet’s unique address hash. Used to identify the wallet in subsequent requests.
</ResponseField>
<ResponseField name="attributes.entityType" type="string">
The type of entity that owns this wallet: `user`, `organization`, or `project`.
</ResponseField>
<ResponseField name="attributes.entityId" type="string">
The ID of the owning entity.
</ResponseField>
<ResponseField name="attributes.purpose" type="string">
The wallet’s purpose, e.g., `operating`, `project_funds`, `general`.
</ResponseField>
<ResponseField name="attributes.currency" type="string">
The wallet’s currency type, e.g., `CREDITS`.
</ResponseField>
<ResponseField name="attributes.balance" type="number">
The current balance.
</ResponseField>
</Expandable>
</ResponseField>
***
## Get Wallet
<CodeGroup>
```http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets/{addressHash}
```
</CodeGroup>
Fetch details for a specific wallet by its address hash. Results are cached for 5 minutes; append `?cache_bust=<timestamp>` to force a fresh fetch.
<ParamField path="addressHash" type="string" required>
The wallet’s unique address hash.
</ParamField>
```bash theme={null}
curl https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets/0xabc123 \
-H "Authorization: Bearer <token>" \
-H "Api-Key: <your_api_key>"
Create Entity Wallet¶
http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets/create_entity_wallet
Create a new wallet for an organization, project, or other entity. Organization wallets are created automatically when a new organization is created.
user, organization, or project.
operating (organizations), project_funds (projects), general. Defaults to general.
CREDITS.
{ "organization_id": "<id>" }.
```bash theme={null}
curl -X POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets/create_entity_wallet \
-H "Authorization: Bearer ***
## Update Wallet
<CodeGroup>
```http theme={null}
PUT https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets/{addressHash}
```
</CodeGroup>
Update wallet properties such as `entity_name` and `description`.
<ParamField path="addressHash" type="string" required>
The wallet’s unique address hash.
</ParamField>
<ParamField body="wallet" type="object" required>
Object containing the fields to update.
</ParamField>
***
## Transaction History
<CodeGroup>
```http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets/{addressHash}/transactions
```
</CodeGroup>
List transactions for a specific wallet with pagination.
<ParamField path="addressHash" type="string" required>
The wallet’s unique address hash.
</ParamField>
<ParamField query="page" type="integer">
Page number. Defaults to `1`.
</ParamField>
<ParamField query="per_page" type="integer">
Items per page. Defaults to `20`.
</ParamField>
```bash theme={null}
curl "https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets/0xabc123/transactions?page=1&per_page=20" \
-H "Authorization: Bearer <token>" \
-H "Api-Key: <your_api_key>"
Transact (Universal Transfer / Conversion)¶
http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets/transact
The universal transaction endpoint handles both transfers between wallets and asset conversions within a single wallet. When from_wallet and to_wallet are the same address, the operation is treated as a conversion.
from_wallet for an in-wallet conversion.
CREDITS).
from_asset for a same-asset transfer.
asset_conversion, wallet_transfer, transfer_with_conversion.
<ParamField body="transaction.metadata.token_prices" type="object">
Optional token price map used for conversions, e.g., `{ "CREDITS": 0.01 }`.
</ParamField>
```bash theme={null}
Transfer CREDITS between wallets¶
curl -X POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets/transact \
-H "Authorization: Bearer
Debit Wallet¶
http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets/{addressHash}/debits
Deduct funds from a wallet. Users can debit their own wallets.
Credit Wallet¶
http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallets/{addressHash}/credits
Add funds to a wallet. Requires admin-level access (Admin-Access header).
Admin-Access header with a valid admin access token.
Wallet Transfers¶
Wallet transfers are a two-step process: the sender creates a transfer request, and the recipient accepts it. Both steps require verification codes.
List Transfer Requests¶
http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallet_transfers
1.
20.
Create Transfer Request¶
http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallet_transfers
List Pending Transfers¶
http theme={null}
GET https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallet_transfers/pending
Return transfers awaiting action by the authenticated user.
Verify Transfer Sender¶
http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallet_transfers/{transferId}/verify_sender
Accept Transfer¶
http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallet_transfers/{transferId}/accept
Reject Transfer¶
http theme={null}
POST https://api.traylinx.com/ma-metrics-wsp-ms/v1/api/wallet_transfers/{transferId}/reject
Built with Mintlify.