📬By Deposit Address

Base URL

All API requests should be made to the following base URL:

https://metadata.emblemvault.io

API Endpoints

Get All Known Projects

Fetches all known assets for the provided owner of the specified category.

Endpoint:

GET {baseURL}/byAddress/:addressType/:address

Path Parameters:

  • addressType (required): Address type you are looking for (ETH, BTC, NMC)

  • address (required): Deposit address within the vault

Responses:

  • 200 OK - The request was successful, and the list of vault ids are returned.

    Example successful response:

    [
        {
            "tokenId": "60454380576612901",
            "btc_address": "1HqQ5TK1aamUdRFrX8UH5r3jV44ci3yqjY",
            "eth_address": null,
            "nmc_address": null
        }
    ]

  • 400 Bad Request - The request was unsuccessful due to incorrect input or an error in processing. Check the response body for more information.

    Example response for empty set:

    {
        "success": false,
        "error": "No items found"
    }

Examples

Here's an example using the request library in Node.js to make a request to the API with the provided address and type:

const request = require('request');

const baseUrl = 'https://metadata.emblemvault.io';
const address = '1HqQ5TK1aamUdRFrX8UH5r3jV44ci3yqjY';
const addressType = 'BTC'

const options = {
    url: `${baseUrl}/byAddress/${addressType}/${address}`
};

request(options, (error, response, body) => {
    if (!error && response.statusCode === 200) {
        const parsedBody = JSON.parse(body);
        console.log(parsedBody);
    } else {
        console.log('Error:', error);
        console.log('Status Code:', response.statusCode);
        console.log('Body:', body);
    }
});

CURL

curl -X GET "https://metadata.emblemvault.io/byAddress/BTC/1HqQ5TK1aamUdRFrX8UH5r3jV44ci3yqjY"

Last updated