ballerinax/nowpayments Ballerina library

1.5.1

Overview

This is a generated connector from NOWPayments API v1 OpenAPI Specification.

NOWPayments is a non-custodial cryptocurrency payment processing platform. Accept payments in a wide range of cryptos and get them instantly converted into a coin of your choice and sent to your wallet. Keeping it simple – no excess. More about the NOWPayments API can be find at NOWPayments

This module supports NOWPayments API version v1.

Prerequisites

Before using this connector in your Ballerina application, complete the following:

Quickstart

To use the NOWPayments connector in your Ballerina application, update the .bal file as follows:

Step 1: Import connector

First, import the ballerinax/nowpayments module into the Ballerina project.

Copy
import ballerinax/nowpayments;

Step 2: Create a new connector instance

You can now intantiate the client.

Copy
nowpayments:ApiKeysConfig apiKeyConfig = {
    xApiKey: "<API_Key>"
};

nowpayments:Client nowpaymentsClient = check new(apiKeyConfig);

Step 3: Invoke an operation

  1. Now you can use the operations available within the connector. Following code demonstrate how to calculating the approximate price in cryptocurrency for a given value in Fiat currency.
Copy
nowpayments:ApproximatePrice estimatedPrice = check nowpaymentsClient->getEstimatedPrice("10", "ONE", "BTC");
  1. Use bal run command to compile and run the Ballerina program.

Import

import ballerinax/nowpayments;Copy

Metadata

Released date: 10 months ago

Version: 1.5.1

License: Apache-2.0


Compatibility

Platform: any

Ballerina version: 2201.4.1

GraalVM compatible: Yes


Pull count

Total: 

Current verison: 0


Weekly downloads


Source repository


Keywords

Finance/Payment
Cost/Paid

Contributors

Other versions

See more...