Generating codes
Getting credentials
Registering codes and reading their analytics require API credentials. The Kamino team issues a username and password on request. These are sent as HTTP basic auth on the calls below.Registering a code
Each code is registered under a unique name of 1 to 64 characters. The name should describe the purpose of the code, as the distributor is responsible for maintaining the mapping from name to code.409.
Tagging deposits
The code is passed as thememo field of the deposit endpoints. For Kamino Earn:
POST /ktx/kvault/deposit or
POST /ktx/kvault/deposit-instructions:
POST /ktx/klend/deposit or
POST /ktx/klend/deposit-instructions:
- The memo must be exactly the code. Matching is case-insensitive.
- Use one code per transaction.
- The
memofield accepts up to 64 UTF-8 bytes. Longer values return400. - Codes use the alphabet
23456789abcdefghjkmnpqrstuvwxyz, so0,1,o,landinever appear.
Analytics
Four endpoints report the deposits attributed to distributor codes. They are private: send the same basic auth credentials used to register codes, or the call returns401. They cover Kamino Earn vault deposits only; tagged Kamino Lend deposits are not reported yet.
Rules that apply to all four:
- Only deposits are attributed. A withdrawal whose transaction carries a code is not listed and does not reduce any total.
startandendare optional query parameters, given as ISO 8601 strings or epoch milliseconds, and either can be given on its own. A missingstartmeans the beginning of history and a missingendmeans now.startis inclusive andendis exclusive, andstartmust be beforeendonce the missing one is filled in, so anendbefore 1970 or astartin the future returns400.- On the three code-based endpoints the code is matched case-insensitively, and an unregistered code returns
404. - Responses are cached for 60 seconds.
limit accepts 1 to 1000 and defaults to 100. When more rows remain, the response carries a paginationToken; the last page has none. Pass it back unchanged on the next call together with the same start and end. The transaction endpoints return the newest deposits first. On the wallets endpoint the token also pins the start and end the first page aggregated over, filling in an omitted bound at the moment of the first page, so later pages total the same set of deposits even while new ones arrive. A wallets token sent with a different start or end returns 400.
amount is a decimal string in the deposited token, not in vault shares. tokenSymbol is null when the token is not known to Kamino.
The wallets endpoint aggregates the same deposits by wallet, ordered by wallet address. Each wallet lists one entry per token it deposited, with the total amount in that token.