Welcome to the cryptomonKeys drops API. This API allows you to manage and automate the transfer of cryptomonKeys NFTs. It is designed to facilitate the integration of cryptomonKeys assets into various applications, bots, or games. With this API, you can programmatically drop cryptomonKeys NFTs, enhancing your project with unique and engaging digital assets. Below, you will find the available endpoints, their descriptions, and examples of how to use them effectively.
To obtain an API key, please contact us on Discord.
The Python client enables users to interact with the drops API programmatically using Python, get it from Github.
base_url = "http://localhost:3091"
auth_token = "your_authorization_token"
client = DropsAPIClient(base_url, auth_token)
transfers = [
{
"receiver": "example_receiver",
"memo": "Test memo",
}
]
create_response = client.create_transfer(transfers)
print("Create drop Response:", create_response)
delete_response = client.delete_transfer(transfer_id)
print("Delete Transfer Response:", delete_response)
# Get transfer by ID
transfer_id = create_response['transferIds'][0]
get_response = client.get_transfer(transfer_id)
print("Get Transfer Response:", get_response)
# Get all transfers with optional query parameters
query_params = {'application': 'example_application'}
get_all_response = client.get_transfers(query_params)
print("Get All Transfers Response:", get_all_response)
The TypeScript client can be found here
const config = {
baseURL: "http://localhost:3091",
authKey: "your_authorization_key",
};
const client = new TransfersClient(config);
const transfers = [
{
receiver: "example_receiver",
memo: "Test memo",
}
];
const transferIds = await client.postTransfer(transfers);
console.log('Posted transfers with IDs:', transferIds);
for (const transferId of transferIds) {
const transfer = await client.getTransferById(transferId);
console.log(`Transfer ${transferId}:`, transfer);
}
const filteredTransfers = await client.getTransfers({ application: applicationName, sort_by_time: 'desc' });
console.log('Filtered transfers:', filteredTransfers);
POST /transfer
Adds one or more transfers to the processing queue. Each transfer must include a receiver and a memo.
Authorization: your-application-private-key
[
{
"receiver": "receiverAccount",
"memo": "This is a transfer memo"
}
]
curl -X POST http://localhost:3091/transfer \ -H "Authorization: your-application-private-key" \ -H "Content-Type: application/json" \ -d '[ { "receiver": "receiverAccount", "memo": "This is a transfer memo" } ]'
DELETE /transfer/{id}
Deletes a transfer from the queue by its ID. Only pending transfers can be deleted.
Authorization: your-application-private-key
curl -X DELETE http://localhost:3091/transfer/transferId \ -H "Authorization: your-application-private-key"
GET /transfer/{id}
Retrieves a transfer by its ID.
curl -X GET http://localhost:3091/transfer/transferId
GET /transfers
Retrieves all transfers with optional filters such as application, receiver, sender, memo, status, and sort.
curl -X GET "http://localhost:3091/transfers?application=appName&status=Pending"