Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I use decimal values? #240

Open
Marcone15 opened this issue May 9, 2024 · 0 comments
Open

How do I use decimal values? #240

Marcone15 opened this issue May 9, 2024 · 0 comments

Comments

@Marcone15
Copy link

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)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant