Skip to navigation
DigitalOcean Referral Badge

Get $200 credit on DigitalOcean

Hostinger logo

Hostinger: Lightning-fast hosting, unbeatable uptime, top-notch support!

Open extra topbar

? Key-based access to JSON API

? Key-based access to JSON API

You can now access the Bitcoin and Altcoin Wallets JSON API with key-based authentication.

Version 4.2.0 is a very special version for the Bitcoin and Altcoin Wallets WordPress plugin: The JSON API can now be accessed via a key. The JSON API is what allows a user to view their wallets, to query past transactions, and to initiate requests for new transactions.

Bitcoin and Altcoin Wallets WordPress plugin version 4.2.0.

This is mainly of interest to developers, as it makes programmatic access easier. Previously, it was not possible to access the JSON API without logging in to WordPress and storing cookies in memory or in a file. Now, it is possible to access the API via a key. The key can be passed as a GET parameter or, preferably, via an HTTP header.

The feature is disabled by default. To enable it for certain users, grant them the access_wallets_api capability. If you wish to do this for a user role, you may do so via the Capabilities menu under Wallets. A random key is assigned to each user with the necessary capability.

This authentication method is only available to JSON API version 3. Older versions of the API do not support this feature and can only be accessed with cookie-based authentication.

Users can view, and refresh, their API key via the [wallets_api_key] shortcode. Refreshing a key means that the old key is invalidated.

Additionally, the API key is shown in the user profile section. The key is shown only to the user, and to any admin with the manage_wallets capability.

To see more information and examples of how to use this feature, consult the accompanying documentation under APIsWalletsJSON APIProgrammatic access to the Transactions API.

Comments:2

  1. That’s nice.
    And for the plug-in “Exchange extension ” There will be an API with which it will be possible to unload data for example on coinmarketcap.com or for example API for connection of additional liquidity from other sources?

    1. Hello,

      For the Exchange extension, the market stats are already available via the exchange’s API; the endpoint is `get_market_summaries`. This is a public endpoint that does not require authentication. You can read more on this API in the documentation that accompanies the Exchange extension, in the bundle download. I am not sure what would be involved in getting this info on to CMC. It’s best if you contact them, they should be able to guide you or parse this endpoint.

      There is no way to magically bring additional liquidity from other markets.

      P.S. If you have any further questions about the exchange, you can also use the forum: https://www.dashed-slug.net/forums/forum/exchange-extension-support/

      with regards

Leave a Reply

Your email address will not be published. Required fields are marked *