Skip to content

How do I use decimal values? #240

Description

@Marcone15

I tried to use a value as in the example but Deriv did not recognize decimal numbers. What do I do?

const stream_src = api.basic.subscribe(
            {
                    amount: 0.35,
                    basis: 'stake',
                    contract_type: 'CALL',
                    proposal: 1,
                    subscribe: 1,
                    currency: 'USD',
                    duration: 100,
                    symbol: 'frxUSDJPY',
            }
        );
// listen for updates, filter those which have payouts greater than 18
const response = await stream_src.pipe(filter(item => item.payout > 18)).toPromise();
console.log(response);

Originally posted by @salar-fs in #43 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions