PHP code example of xrplwin / xrpl-orderbook-reader

1. Go to this page and download the library: Download xrplwin/xrpl-orderbook-reader library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

xrplwin / xrpl-orderbook-reader example snippets


use \XRPLWin\XRPL\Client;

$xrplwinapiclient = new Client([]);
$lc = new LiquidityCheck([
  # Trade:
  'from' => [
    'currency' => 'XRP'
  ],
  'amount' => 10,
  'to' => [
    'currency' => 'USD',
    'issuer' => 'rhub8VRN55s94qWKDv6jmDy1pUykJzF3wq'
  ],  
],
[
  # Options:
  //'rates' => 'to',
  //'maxSpreadPercentage' => 4,
  //'maxSlippagePercentage' => 3,
  //'maxSlippagePercentageReverse' => 3,
  //'maxBookLines' => 500,
  '