NAME

Finance::GDAX::API::Fill - Retrieve GDAX fill orders

SYNOPSIS

use Finance::GDAX::API::Fill;

# Get all fills for a given $orderid
$fills = Finance::GDAX::API::Fill->new(order_id => $orderid)->get;

# Get all fills for a given $productid
$gdax_fills = Finance::GDAX::API::Fill->new;
$gdax_fills->product_id($productid);
$fills = $gdax_fills->get;

# Or get all of them
$gdax_fills = Finance::GDAX::API::Fill->new;
$fills = $gdax_fills->get;

DESCRIPTION

Returns an array of recent fills to orders.

The ATTRIBUTES may be set to limit what is returned.

The returned array according to current API docs should look like this:

[
  {
      "trade_id": 74,
      "product_id": "BTC-USD",
      "price": "10.00",
      "size": "0.01",
      "order_id": "d50ec984-77a8-460a-b958-66f114b0de9b",
      "created_at": "2014-11-07T22:19:28.578544Z",
      "liquidity": "T",
      "fee": "0.00025",
      "settled": true,
      "side": "buy"
  }
]

Also from the API docs:

Settlement and Fees

    Fees are recorded in two stages. Immediately after the matching engine completes a match, the fill is inserted into our datastore. Once the fill is recorded, a settlement process will settle the fill and credit both trading counterparties.

    The fee field indicates the fees charged for this individual fill.

Liquidity

    The liquidity field indicates if the fill was the result of a liquidity provider or liquidity taker. M indicates Maker and T indicates Taker.

ATTRIBUTES

order_id

An order ID as generated by the GDAX exchange.

product_id

A GDAX exchange product id.

METHODS

get

Returns an array of "recent" fills. This array can be limited by specifying an order_id attribute or a product_id attribute.

See the DESCRIPTION for an example return structure.

Although the API supports pagination, this API currently does not support it, and only the first page of the results will be returned (as sorted by largest trade_id)

AUTHOR

Mark Rushing <mark@orbislumen.net>

COPYRIGHT AND LICENSE

This software is copyright (c) 2017 by Home Grown Systems, SPC.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.