Skip to content

Commit

Permalink
added bids and asks query params to markets depth
Browse files Browse the repository at this point in the history
  • Loading branch information
ktpx committed Sep 21, 2022
1 parent f48c6cf commit 1d89359
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions lib/Firi/API.pm
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ package Firi::API;
#
##

our $VERSION = '2021.12.22';
our $VERSION = '2022.09.21';

use LWP::UserAgent;
use JSON::XS;
Expand Down Expand Up @@ -298,9 +298,15 @@ sub market_depth {
}
else {
my $market = $params{'market'};
$result = $self->get_pub("/v2/markets/$market/depth");
my $url = "/v2/markets/$market/depth";

if (exists $params{'asks'} ||
exists $params{'bids'}) {
my $query = URI::Query->new(%params);
$url = "$url?" . "$query";
}
$result = $self->get_pub($url);
}

return $result;
}

Expand Down

0 comments on commit 1d89359

Please sign in to comment.