Skip to content

Unable to make an order with the market.indexPrice ?  #210

@slashbinslashnoname

Description

@slashbinslashnoname

How to get the price for long or short ?

To pass an order i'm using getMarket.indexPrice but order cannot pass without using a multiplier (0.1%)


	const accounts = await getAccounts();
	console.log(accounts);

	const market = await getMarket("MATIC-USD");
	console.log(market);

then

const order = await placeOrder(
	"MATIC-USD",
	"BUY",
	"MARKET",
	"FOK",
	false,
	parseInt(accounts[0].freeCollateral / market.indexPrice).toString(),
	(market.indexPrice * 1.002).toFixed(size),
	plus30m
);
console.log(order);

What can I use as price to a market order ?

Transaction is systematically expired

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    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