container: src: fetch: gemini: add debug logging
This commit is contained in:
@@ -107,7 +107,9 @@ namespace docker_finance\exchanges\internal\exchanges\gemini
|
|||||||
string $method = 'GET',
|
string $method = 'GET',
|
||||||
array $params = []
|
array $params = []
|
||||||
): mixed {
|
): mixed {
|
||||||
return $this->get_api()->request($path, $api, $method, $params, null, null, []);
|
$response = $this->get_api()->request($path, $api, $method, $params, null, null, []);
|
||||||
|
utils\CLI::print_debug($response);
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +130,9 @@ namespace docker_finance\exchanges\internal\exchanges\gemini
|
|||||||
*/
|
*/
|
||||||
private function get_symbols(): array
|
private function get_symbols(): array
|
||||||
{
|
{
|
||||||
return $this->request('v1/symbols', 'public');
|
$response = $this->request('v1/symbols', 'public');
|
||||||
|
utils\CLI::print_debug($response);
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -138,12 +142,15 @@ namespace docker_finance\exchanges\internal\exchanges\gemini
|
|||||||
private function get_trades(string $symbol, string $timestamp): array
|
private function get_trades(string $symbol, string $timestamp): array
|
||||||
{
|
{
|
||||||
// Don't use ccxt fetch_my_trades because API consistency (in returned results) is needed
|
// Don't use ccxt fetch_my_trades because API consistency (in returned results) is needed
|
||||||
return $this->request(
|
$response = $this->request(
|
||||||
'v1/mytrades',
|
'v1/mytrades',
|
||||||
'private',
|
'private',
|
||||||
'POST',
|
'POST',
|
||||||
['symbol' => $symbol, 'timestamp' => $timestamp, 'limit_trades' => self::PAGINATION_LIMIT]
|
['symbol' => $symbol, 'timestamp' => $timestamp, 'limit_trades' => self::PAGINATION_LIMIT]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
utils\CLI::print_debug($response);
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -295,11 +302,14 @@ namespace docker_finance\exchanges\internal\exchanges\gemini
|
|||||||
*/
|
*/
|
||||||
private function get_transactions(int $timestamp): array
|
private function get_transactions(int $timestamp): array
|
||||||
{
|
{
|
||||||
return $this->get_api()->fetch_transactions(
|
$response = $this->get_api()->fetch_transactions(
|
||||||
null,
|
null,
|
||||||
$timestamp,
|
$timestamp,
|
||||||
self::PAGINATION_LIMIT
|
self::PAGINATION_LIMIT
|
||||||
);
|
);
|
||||||
|
|
||||||
|
utils\CLI::print_debug($response);
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
//! @brief Implements read handler
|
//! @brief Implements read handler
|
||||||
@@ -402,12 +412,15 @@ namespace docker_finance\exchanges\internal\exchanges\gemini
|
|||||||
$until_timestampms = $this->get_max_timestampms();
|
$until_timestampms = $this->get_max_timestampms();
|
||||||
}
|
}
|
||||||
|
|
||||||
return $this->request(
|
$response = $this->request(
|
||||||
'v1/earn/history',
|
'v1/earn/history',
|
||||||
'private',
|
'private',
|
||||||
'POST',
|
'POST',
|
||||||
['limit' => 500, 'interestOnly' => true, 'since' => $this->get_given_timestampms(), 'until' => $until_timestampms, 'sortAsc' => false] // @phpstan-ignore-line // TODO: resolve
|
['limit' => 500, 'interestOnly' => true, 'since' => $this->get_given_timestampms(), 'until' => $until_timestampms, 'sortAsc' => false] // @phpstan-ignore-line // TODO: resolve
|
||||||
); // TODO: set PAGINATION_LIMIT
|
); // TODO: set PAGINATION_LIMIT
|
||||||
|
|
||||||
|
utils\CLI::print_debug($response);
|
||||||
|
return $response;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user