bitbuy-at / nexpay-api-client
Client for Nexpay HTTP API with support for Laravel
Requires
- php: ^8.0
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^7.0 || ^8.0 || ^9.0 || ^10.0
- nesbot/carbon: ^2.16
Requires (Dev)
- phpunit/phpunit: ^9
This package is auto-updated.
Last update: 2025-04-29 01:36:14 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)
- Get Time:
Nexpay::getTime(): int
- Get Symbols:
Nexpay::getAssetPairs(): PairsCollection
- Get Order Book For Symbol:
Nexpay::getOrderBook(string $pair): OrderBook
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)
- Get Balance:
Nexpay::getAccountBalance(): AccountsCollection
- Get Crypto Transaction Fee:
Nexpay::getCryptoTransactionFee(string $currency, string $amount, string $account): CryptoTransactionFee
- Get Cryptocurrency Deposit Address:
Nexpay::getCryptoCurrencyDepositAddress(string $currency, ?string $account = null): string
- Get Transaction List:
Nexpay::getTransactions(array $params = []): TransactionsCollection
- Get GBX (Nexpay Token) Utilization List:
Nexpay::getGBXUtilizationTransactions(array $params = []): GBXUtilizationTransactionsCollection
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.
- Fork it.
- Create a feature branch (git checkout -b my_feature)
- Commit your changes (git commit -m "Added My Feature")
- Push to the branch (git push origin my_feature)
- Open a Pull Request
- 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