Skip to content

Commit

Permalink
Merge pull request ccxt#17049 from youknowone/krakenfutures-precision
Browse files Browse the repository at this point in the history
[krakenfutures] fix amount precision
  • Loading branch information
kroitor authored Mar 6, 2023
2 parents 0bfc450 + 478c023 commit 9e233b3
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions js/krakenfutures.js
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,8 @@ module.exports = class krakenfutures extends Exchange {
// swap == perpetual
let settle = undefined;
let settleId = undefined;
const amountPrecision = this.parseNumber (this.parsePrecision (this.safeString (market, 'contractValueTradePrecision', '0')));
const pricePrecision = this.safeNumber (market, 'tickSize');
const contract = (swap || future);
if (contract) {
const exchangeType = this.safeString (market, 'type');
Expand Down Expand Up @@ -345,8 +347,8 @@ module.exports = class krakenfutures extends Exchange {
'strike': undefined,
'optionType': undefined,
'precision': {
'amount': index ? undefined : this.parseNumber ('1'),
'price': this.safeNumber (market, 'tickSize'),
'amount': amountPrecision,
'price': pricePrecision,
},
'limits': {
'leverage': {
Expand Down

0 comments on commit 9e233b3

Please sign in to comment.