Fetch data

Visit https://api.radixapi.net/docs to find a list of all publicly available endpoints including examples.

When you use the "Try out" feature, the related curl command will also be shown to you.

Javascript example:

export const getData = async () => {
  const requestOptions = {
    method: "GET",
    headers: {
      accept: "application/json",
      "Content-Type": "application/json",
      Authorization: "Bearer hjfdlsöfods_8i89673fds-fdsrfsd",
    },
  };

  try {
    const result = await fetch(
      "https://api.radixapi.net/v1/route/endpoint",
      requestOptions
    ).then((res) => res.json());

    if (result.code === 200) {
      return result.data;
    } else return -1;
  } catch (error) {
    console.log("Error during data fetch: ", error);
    return -1;
  }
};

You can connect to the WebSocket by using the following command:

wss://api.radixapi.net/v1/transactions?bearer_token=xyz_N0tAVal1d_beAr3r

Last updated