Skip to main content

Create Position

Place a prediction position in an active SpotOn game.

Endpoint

POST https://api.metafide.io/v1/surge/games/spot

Headers

HeaderValue
Accept*/*
Content-Typeapplication/json
x-api-keyYour Metafide API key

Request Body

{
"gid": "489808",
"c": "USDC",
"a": "BTC_USDT",
"sp": "67273",
"f": "67.5",
"pw": "0x3d6520782B3fD66507A042a31Af5155da9e2bb63",
"n": "testnet",
"it": 86400
}

Request Fields

FieldTypeRequiredDescription
gidstringYesThe unique identifier of the game to place a position in. Get this from the Spot Games endpoint
cstringYesThe currency to stake (e.g. USDC)
astringYesThe asset you are predicting (e.g. BTC_USDT)
spstringYesYour predicted closing price for the asset
fstringYesThe amount you are staking
pwstringYesYour wallet address
nstringYesThe network to place the position on (e.g. mainnet, testnet)
itnumberYesThe game interval in seconds (e.g. 60, 3600, 86400)

Example Request

// Node 18+ has native fetch — no import needed

const url = 'https://api.metafide.io/v1/surge/games/spot';

const options = {
method: 'POST',
headers: {
'Accept': '*/*',
'Content-Type': 'application/json',
'x-api-key': 'metafide_11111111111111111111111111111',
},
body: JSON.stringify({
gid: '489808',
c: 'USDC',
a: 'BTC_USDT',
sp: '67273',
f: '67.5',
pw: '0x3d65207Af82B3fD66507A042a315155da9e2bb63',
n: 'testnet',
it: 86400,
}),
};

try {
const response = await fetch(url, options);
const data = await response.json();
console.log(data);
} catch (error) {
console.error(error);
}
tip

Use the Spot Games endpoint to get the current gid before placing a position. Make sure can_place_position is true before submitting.

warning

Each user can place up to 10 positions per game per interval. Exceeding this limit or submitting a duplicate position will return a 409 Conflict error.

Response

{
"gid": "489808",
"c": "USDC",
"a": "BTC_USDT",
"id": 1,
"f": "67.5",
"sp": "67273",
"cm": false,
"cmt": null,
"w": "0",
"r": null,
"pw": "0x3d65207Af382B3fD66507A042a315155da9e2bb6",
"win": null,
"t": "1771507627221",
"tx": null,
"txid": "b7c8dbf1-dff3-4fdd-a829-cb563e293c24",
"p": null,
"created_at": "2026-02-19T13:27:07.223Z",
"st": "success",
"it": 86400,
"n": "testnet",
"username": "John Doe",
"avatar": {
"imageUrl": "/avatars/default.svg",
"backgroundColor": "#4285f4"
}
}

Response Fields

FieldTypeDescription
gidstringUnique identifier of the game the position was placed in
cstringCurrency used for the position
astringAsset the position was placed on
idnumberUser ID of the position owner
fstringThe stake amount placed
spstringThe predicted price submitted by the user
cmbooleanWhether the position has been claimed
cmtstring | nullClaim transaction hash, null if not yet claimed
wstringProjected winnings at the time of placement. Returns "0" until the game progresses
rnumber | nullProjected return percentage, null until the game progresses
pwstringThe wallet address of the position owner
winnumber | nullFinal winnings, null if the game is still ongoing
tstringUnix timestamp in milliseconds of when the position was placed
txstring | nullTransaction hash of the position, null if not yet confirmed
txidstringInternal unique identifier for the transaction
pany | nullAdditional position metadata, null if not applicable
created_atstringISO 8601 timestamp of when the position was created
ststringStatus of the position (e.g. success)
itnumberGame interval in seconds
nstringNetwork the position was placed on
usernamestringDisplay name of the position owner

avatar

FieldTypeDescription
imageUrlstringURL of the user's avatar image
backgroundColorstringHex color code of the avatar background