Execute AA getter

Execute AA getter function

Example

const iusd_amount = 100;
const params = {
  address: 'VLKI3XMMX5YULOBA6ZXBXDPI6TXF6V3D',
  getter: 'get_exchange_result',
  args: [0, iusd_amount]
};

client.api.executeGetter(params, function(err, result) {
  if (err) return console.error(err);
  console.log(result);
});

Returns

{
  reserve_needed: 362169,
  reserve_delta: 362346,
  fee: 0,
  regular_fee: false,
  reward: 177,
  initial_p2: 0.036234510530851,
  p2: 0.0362345130263091,
  target_p2: 0.0367399935327185,
  new_distance: 0.0139502497533879,
  turnover: 362346,
  fee_percent: 0,
  slow_capacity_share: 0.5
}

Learn more

Last updated