Overview
REST API
We provide a REST API to interact with our on-chain programs. The base url for all requests in production/mainnet is https://api.mallow.art/v1
Rate Limits
Requests are limited to 10 per second per IP address
Get your API key
Your API requests are authenticated using API keys. Any request that doesn't include an API key will return an error.
You can request an API key by contacting the mallow team on our Discord.
Set the X-Api-Key
header with your API key to authenticate requests.
Transactions
Endpoints that return a transaction to be signed will have the following response body:
{
"result": "AQAAAAAAAAAAA...AAAHL2xa1PfAJQ1dwAAAAA=" // base64 encoded
}
All transactions are serialized VersionedTransaction
Clients can create a VersionedTransaction object and have the user sign it as follows:
const encodedTx = (
await (
await fetch("https://api.mallow.art/v1/getBidOrBuyTx", {
method: "POST",
headers: {
"Content-Type": "application/json",
"X-Api-Key": "YOUR-API-KEY",
},
body: JSON.stringify({
buyer: publicKey.toBase58(),
mint: mint.toBase58(),
}),
})
).json()
).result;
const tx = VersionedTransaction.deserialize(Buffer.from(encodedTx, "base64"));
const signedTx = await wallet.signTransaction(tx);
const txId = await sendAndConfirmRawTransaction(
connection,
signedTx.serialize()
);
Prices / Amounts
All prices or amounts are in the smallest unit of the token unless otherwise specified. For example, if you want to bid on an artwork for 0.01 SOL, you would specify 1000000 as your price.
The USDC token uses 6 decimal places so specify 6000000 for 6 USDC.