bitbuy-at/nexpay-api-client

Client for Nexpay HTTP API with support for Laravel

v0.6.1 2024-01-30 12:40 UTC

README

This project is only supporting a selected choice of api calls to the nexpay api, feel free to contribute!

nexpay-api-client

Client for Nexpay HTTP API with support for Laravel. API docs: https://paynexpay.com/api

Install

composer require bitbuy-at/nexpay-api-client

Laravel

If you're using Laravel, the package will automatically register the Nexpay provider and facade.

Configuration

You can update your .env file with the following settings (only needed for private calls):

NEXPAY_KEY=key
NEXPAY_MESSAGE_SECRET=message_secret
NEXPAY_OUTGOING_SECRET=outgoing_secret

Usage

Get current prices

use bitbuyAT\Nexpay\Facade\Nexpay;

$tradingPair = 'BTCEUR';
$prices = Nexpay::getTicker($tradingPair);
$prices->getData();
$prices->askPrice();
$prices->bidPrice();

More examples can be found in the /tests folder.

Supported Methods

All currently supported methods with params explanation can be found in the client interface (src/Contracts/Client.php).

EURO wallet methods (private)

  • Get Account Information: Nexpay::getEuroAccountStatus(): EuroAccountsCollection
  • Get Account History: Nexpay::getEuroPaymentHistory(string $fromDate = null, string $toDate = null, string $account = null): EuroPaymentHistory
  • Make New Payment: Nexpay::makeEuroPayment(EuroPaymentParameters $params, string $transactionSignature = null): EuroPaymentStatus

Old methods

Methods that are no longer available since the Nexpay exchange was discontinued

Market Data methods (public)

Trading methods (private)

  • Place New Order: Nexpay::placeNewOrder(NewOrderParameters $newOrderParams): ExecutionReport
  • Cancel Order: Nexpay::cancelOrder(string $clientOrderId, string $account): ExecutionReport
  • Cancel All Orders: Nexpay::cancelAllOrders(array $params = []): ExecutionReport
  • Get My Trades: Nexpay::getMyTrades(GetMyTradesParameters $getMyTradesParams): MyTradesCollection

Payment Data methods (private)

Do you need any further method, which is not listed here? Just open an issue with the required method or even better open a PR to speed things up!

Contributing

Want to contribute? Great!

Create a new issue first, describing the feature or bug.

Just fork our code, make your changes, then let us know and we will review it.

  1. Fork it.
  2. Create a feature branch (git checkout -b my_feature)
  3. Commit your changes (git commit -m "Added My Feature")
  4. Push to the branch (git push origin my_feature)
  5. Open a Pull Request
  6. Enjoy and wait ;)

We are constantly updating and improving our code. We hope it can be for the benefit of the entire community.

Who are we?

This package is maintained by bitbuy GmbH. We develop crypto and blockchain related software and operate a Vienna-based Bitcoin Store (bitcoin.wien). Feel free to visit our website for more info, if you're based in Vienna and looking to buy Bitcoin for cash. You can also sell your Bitcoin for cash in our store.

License

MIT License

Please check LICENSE.txt