Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.taxmaxi.com/llms.txt

Use this file to discover all available pages before exploring further.

Sources are the starting point for any tax calculation in TaxMaxi. A source maps to a single onchain wallet address. You can list all sources attached to your account, or create a new one by providing a wallet address. Creating a source is idempotent — if you submit the same wallet address twice, the API returns the existing source rather than creating a duplicate. Pass sync: true in the create request to kick off a sync job immediately, saving you a separate API call.

List sources

Retrieves all sources associated with the authenticated user.
GET /v1/sources
Required header: Authorization: Bearer <token>

Response fields

sources
object[]
required
Array of source objects belonging to your account.

Example

curl https://api.taxmaxi.com/v1/sources \
  --header "Authorization: Bearer <token>"
Response
{
  "sources": [
    {
      "id": "src_01hzqe3kj8t2v5n6b7d9f0gx",
      "name": "My Solana Wallet",
      "providerKey": "4Nd1m...bZx3"
    }
  ]
}

Errors

StatusCodeDescription
400SourceBadRequestErrorThe request is malformed or contains invalid parameters.
500InternalServerErrorAn unexpected server error occurred.

Create a source

Creates a new source for the given wallet address, or returns the existing source if one already exists for that address. Supports both authenticated and anonymous requests.
POST /v1/sources
Optional header: Authorization: Bearer <token> — omit to create an anonymous source.

Request body

type
string
required
The source type. Must be "onchain".
walletAddress
string
required
The onchain wallet address to import. Must be a non-empty string.
name
string
A display name for the source. If omitted, the API assigns a default name.
sync
boolean
When true, starts a sync job immediately after the source is created or found. The response includes the sync job details in syncJob.
year
integer
The tax year to associate with this source. Must be 2020 or later.
jurisdiction
string
The jurisdiction to use for tax calculations (e.g. "germany").

Response fields

source
object
required
The created or reused source.
created
boolean
required
true if a new source was created. false if an existing source was found and reused — no duplicate is created.
syncJob
object | null
required
Details of the sync job started on creation. Present only when you passed sync: true; null otherwise.
claim
object | null
required
An anonymous claim handle. Returned only when the request is made without authentication. Use claimToken to associate the source with an account later. null for authenticated requests.

Examples

curl --request POST https://api.taxmaxi.com/v1/sources \
  --header "Authorization: Bearer <token>" \
  --header "Content-Type: application/json" \
  --data '{
    "type": "onchain",
    "walletAddress": "4Nd1mBQtrMJVYVfKf2PX6UB5VDiMSBU7eFnEYWRdH5aq",
    "name": "My Solana Wallet",
    "sync": true,
    "year": 2024,
    "jurisdiction": "germany"
  }'
Response (sync: true)
{
  "source": {
    "id": "src_01hzqe3kj8t2v5n6b7d9f0gx",
    "name": "My Solana Wallet",
    "providerKey": "4Nd1mBQtrMJVYVfKf2PX6UB5VDiMSBU7eFnEYWRdH5aq"
  },
  "created": true,
  "syncJob": {
    "sourceId": "src_01hzqe3kj8t2v5n6b7d9f0gx",
    "jobId": "job_01hzqe4xr7p3w8m0c2e5h1ky",
    "status": "queued",
    "message": null
  },
  "claim": null
}

Errors

StatusCodeDescription
400SourceBadRequestErrorThe request body is missing required fields or contains invalid values.
401UnauthorizedErrorThe bearer token is missing or invalid.
402SourcePaymentRequiredErrorYour account has reached its source limit or requires a paid plan.
500InternalServerErrorAn unexpected server error occurred.