Account

GET Positions

GET /v1/account/positions/{address}

Get all statistics related to Moby.

Path Parameters

Query Examples

curl --request GET \
     --url https://api.moby.trade/v1/account/positions/0x1234123412341234000000000000000000000000 \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

Response Examples

{
    "account": "0xc45d5902d25af59d765837ebf2ce4871f67d741f",
    "BTC": [],
    "ETH": [
    {
        "expiry": "1719993600",
        "settlePrice": "3355.6346210083343",
        "positions": [
        {
            "underlyingAsset": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
            "optionTokenId": "3536458052708603627014226979739327865384555007091614891234083384688902144",
            "length": "1",
            "markPrice": 0,
            "markIv": 0,
            "mainOptionStrikePrice": 3400,
            "pairedOptionStrikePrice": 0,
            "isBuys": "true,false,false,false",
            "strikePrices": "3400,0,0,0",
            "isCalls": "true,false,false,false",
            "optionNames": "ETH-3JUL24-3400-C,,,",
            "size": "1192516486319087",
            "sizeOpened": "1192516486319087",
            "sizeClosing": "0",
            "sizeClosed": "0",
            "sizeSettled": "0",
            "isBuy": true,
            "executionPrice": "27447000000000000000000000000000",
            "openedToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
            "openedAmount": "32731",
            "openedCollateralToken": "",
            "openedCollateralAmount": "0",
            "openedAvgExecutionPrice": "27447000000000000000000000000000",
            "openedAvgSpotPrice": "3422163333333333000000000000000000",
            "closedToken": "",
            "closedAmount": "0",
            "closedCollateralToken": "",
            "closedCollateralAmount": "0",
            "closedAvgExecutionPrice": "0",
            "closedAvgSpotPrice": "0",
            "settledToken": "",
            "settledAmount": "0",
            "settledCollateralToken": "",
            "settledCollateralAmount": "0",
            "settledPrice": "0",
            "isSettled": false,
            "lastProcessBlockTime": "1719969792"
        },
        {
            "underlyingAsset": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
            "optionTokenId": "3536458052708691506438522393270021566436479914421440324210305881172082688",
            "length": "1",
            "markPrice": 0,
            "markIv": 0,
            "mainOptionStrikePrice": 3400,
            "pairedOptionStrikePrice": 0,
            "isBuys": "false,false,false,false",
            "strikePrices": "3400,0,0,0",
            "isCalls": "true,false,false,false",
            "optionNames": "ETH-3JUL24-3400-C,,,",
            "size": "99970000000000",
            "sizeOpened": "99970000000000",
            "sizeClosing": "0",
            "sizeClosed": "0",
            "sizeSettled": "0",
            "isBuy": false,
            "executionPrice": "22105000000000000000000000000000",
            "openedToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
            "openedAmount": "2209",
            "openedCollateralToken": "0x82aF49447D8a07e3bd95BD0d56f35241523fBab1",
            "openedCollateralAmount": "99970000000000",
            "openedAvgExecutionPrice": "22105000000000000000000000000000",
            "openedAvgSpotPrice": "3416529999999999700000000000000000",
            "closedToken": "",
            "closedAmount": "0",
            "closedCollateralToken": "",
            "closedCollateralAmount": "0",
            "closedAvgExecutionPrice": "0",
            "closedAvgSpotPrice": "0",
            "settledToken": "",
            "settledAmount": "0",
            "settledCollateralToken": "",
            "settledCollateralAmount": "0",
            "settledPrice": "0",
            "isSettled": false,
            "lastProcessBlockTime": "1719969520"
        }]
    }],
    "lastUpdatedAt": "1719970232"
}

Properties in the Response

GET Trade History

GET /v1/account/optionTradeHistories/{address}

Path Parameters

Query Parameters

Query Examples

curl --request GET \
     --url https://api.moby.trade/v1/account/optionTradeHistories/0x1234123412341234000000000000000000000000?period=7 \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

Response Examples

{
    "positionHistories": {
        "nodes": [
            {
                "avgExecutionPrice": "520544000000000000000000000000000",
                "collateralAmount": "258",
                "collateralToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
                "expiry": "1719993600",
                "processBlockTime": "1719975483",
                "quoteToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
                "quoteAmount": "686",
                "requestIndex": "8122",
                "roi": "-2.256485522837646769533411200590151841150796090244052375975902133153009159648368",
                "cashFlow": "-686654100000000000000000000",
                "executionPrice": "532290000000000000000000000000000",
                "optionTokenId": "1769610987930947441232244654660689200347727778291612626361544332479037440",
                "pnl": "-15152340000000000000000000",
                "settlePayoff": "0",
                "settlePrice": "0",
                "size": "129",
                "spotPrice": "61345333333333330000000000000000000",
                "type": "close"
            }
        ],
        "totalCount": 1
    }
}

Properties in the Response

GET Settlement History

GET /v1/account/optionSettlementHistories/{address}

Path Parameters

Query Parameters

Query Examples

curl --request GET \
     --url https://api.moby.trade/v1/account/optionSettlementHistories/0x1234123412341234000000000000000000000000?period=7 \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

Response Examples

{
    "data": {
    "positionHistories": {
    "nodes": [
        {
            "avgExecutionPrice": "439800000000000000000000000000000",
            "collateralAmount": "59852",
            "collateralToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
            "expiry": "1719648000",
            "processBlockTime": "1719758242",
            "quoteToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
            "quoteAmount": "162",
            "requestIndex": "0",
            "roi": "62.349338436230104592996816734879490677580718508412914961346066393815370623010459",
            "cashFlow": "-162275857366310800000000000",
            "executionPrice": "0",
            "optionTokenId": "1769610432572719948203728359705121581943010641362055698700830170540933120",
            "pnl": "268728142633689200000000000",
            "settlePayoff": "165587609557460000000000000000000",
            "settlePrice": "61084412390442540000000000000000000",
            "size": "98",
            "spotPrice": "0",
            "type": "settle"
        },
        {
            "avgExecutionPrice": "236653000000000000000000000000000",
            "collateralAmount": "52",
            "collateralToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
            "expiry": "1719648000",
            "processBlockTime": "1719758237",
            "quoteToken": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
            "quoteAmount": "14",
            "requestIndex": "0",
            "roi": "30.029363854478920613725581336387030800370162220635276121578851736508727968798198",
            "cashFlow": "-14902884860171400000000000",
            "executionPrice": "0",
            "optionTokenId": "1769610432573159345325205293554118896057718128428862753112610152738979840",
            "pnl": "6395885139828600000000000",
            "settlePayoff": "165587609557460000000000000000000",
            "settlePrice": "61084412390442540000000000000000000",
            "size": "9",
            "spotPrice": "0",
            "type": "settle"
        }
    ],
    "totalCount": 2
    }
    }
}

Properties in the Response

GET Trade Status

GET /v1/account/optionTradeStatus/{address}

Path Parameters

Query Examples

curl --request GET \
     --url https://api.moby.trade/v1/account/optionTradeStatus/0x1234123412341234000000000000000000000000?period=7 \
     --header 'accept: application/json' \
     --header 'content-type: application/json'

Response Examples

{
    "BTC": {
        "tradeCount": 106,
        "tradeSize": 0.024331320000000004,
        "notionalVolume": 2658.7363451839738,
        "open": {
            "call": {
                "buy": 0.0030655400000000007,
                "sell": 0.00002672
            },
            "put": {
                "buy": 0.008198859999999999,
                "sell": 0.00087572
            },
            "type": {
                "buyNakedCall": 0.0021817600000000005,
                "buyCallSpread": 0.00088378,
                "buyNakedPut": 0.0009324899999999999,
                "buyPutSpread": 0.00726637,
                "sellNakedCall": 0.00000142,
                "sellCallSpread": 0.0000253,
                "sellNakedPut": 0.00000886,
                "sellPutSpread": 0.00086686
            }
        },
        "close": {
            "call": {
                "buy": 0.0030655400000000007,
                "sell": 0.00002672
            },
            "put": {
                "buy": 0.00819757,
                "sell": 0.00087465
            }
        },
        "tradeSizeByTerm": {
        "sVault": 0.024331320000000004,
        "mVault": 0,
        "lVault": 0
        }
    },
    "ETH": {...},
    "address": "0x1234123412341234000000000000000000000000"
}

Properties in the Response

Last updated