Error Codes

StarkPerpetualErrorCode

An enumeration.

ILLEGAL_POSITION_TRANSITION_ENLARGING_SYNTHETIC_HOLDINGS=0

New position after transaction-induced updates has larger absolute value of synthetic asset.

ILLEGAL_POSITION_TRANSITION_NO_RISK_REDUCED_VALUE=2

Position before transaction-induced updates has tr = 0 and tv got smaller.

ILLEGAL_POSITION_TRANSITION_REDUCING_TOTAL_VALUE_RISK_RATIO=1

New position after transaction-induced updates has smaller tv / tr.

INVALID_ASSET_CONFIG=3

Asset oracle prices does not match the config, oracle prices tick should be sent.

INVALID_ASSET_ORACLE_PRICE=4

Asset oracle price is not valid (for example, median price does not match the signed prices).

INVALID_COLLATERAL_ASSET_ID=5

Collateral asset id does not match the configured collateral asset id.

INVALID_FEE_POSITION_PARTICIPATION=6

Fee position is participating in a transaction it can’t participate in (trade, liquidate).

INVALID_FORCED_TRANSACTION=7

Forced transaction is not valid (for example, is_valid is wrong).

INVALID_FULFILLMENT_ASSETS_RATIO=8

Synthetic/collateral order ratio not satisfied in fulfillment transaction.

INVALID_FULFILLMENT_FEE_RATIO=9

Fee/synthetic order ratio not satisfied in fulfillment transaction.

INVALID_FULFILLMENT_INFO=10

Fulfillment transaction and order amounts mismatch.

INVALID_FUNDING_TICK_RATE=11

Funding tick rate is out of range.

INVALID_FUNDING_TICK_TIMESTAMP=12

Funding tick timestamp is not valid, not progressing compared to the previous.

INVALID_LIQUIDATE=13

Liquidate didnt create a smaller position.

INVALID_ORDER_ASSETS=14

Mismatching assets for orders in fulfillment transaction.

INVALID_ORDER_IS_BUYING_PROPERTY=15

Order is_buying property is not set correctly.

INVALID_PUBLIC_KEY=16

Public key is not valid (for example, does not match the position’s public key).

INVALID_SYNTHETIC_ASSET_ID=17

Synthetic asset id does not match any of the configured synthetic asset ids.

INVALID_TICK_TIMESTAMP_DISTANCE_FROM_BLOCKCHAIN_TIME=18

Tick’s timestamp isn’t close enough to the blockchain time.

MISSING_GLOBAL_FUNDING_INDEX=19

Missing global funding index for synthetic asset.

MISSING_ORACLE_PRICE=20

Missing oracle price for synthetic asset.

MISSING_ORACLE_PRICE_SIGNED_IN_TIME_RANGE=21

Missing oracle price for synthetic asset with enough signatures in valid time range.

MISSING_SIGNED_ORACLE_PRICE=22

Missing signed oracle price for synthetic asset (not enough signatures).

MISSING_SYNTHETIC_ASSET_ID=23

Missing synthetic asset id.

OUT_OF_RANGE_ASSET_ID=24

Asset ID value is out of range.

OUT_OF_RANGE_ASSET_RESOLUTION=25

Synthetic asset resolution is out of range.

OUT_OF_RANGE_COLLATERAL_ASSET_ID=26

Collateral asset ID value is out of range.

OUT_OF_RANGE_CONTRACT_ADDRESS=27

Contract address value is out of range.

OUT_OF_RANGE_EXTERNAL_PRICE=28

External price value is out of range.

OUT_OF_RANGE_FACT=30

Fact value is out of range.

OUT_OF_RANGE_FUNDING_INDEX=31

Funding index value is out of range.

OUT_OF_RANGE_FUNDING_RATE=32

Funding rate value is out of range.

OUT_OF_RANGE_ORACLE_PRICE_SIGNED_ASSET_ID=29

External asset ID value is out of range.

OUT_OF_RANGE_POSITION_ID=33

Position ID value is out of range.

OUT_OF_RANGE_PRICE=34

Price value is out of range.

OUT_OF_RANGE_RISK_FACTOR=35

Risk factor value is out of range.

OUT_OF_RANGE_TIMESTAMP=36

Timestamp value is out of range.

OUT_OF_RANGE_TOTAL_RISK=37

Total risk is out of range.

OUT_OF_RANGE_TOTAL_VALUE=38

Total value is out of range.

SAME_POSITION_ID=39

A transaction involving two parties cannot be between a position and itself.

SYSTEM_TIME_DECREASING=40

System time must not decrease.

TOO_MANY_SYNTHETIC_ASSETS_IN_POSITION=41

A position has too many synthetic assets.

TOO_MANY_SYNTHETIC_ASSETS_IN_SYSTEM=42

The general config contains too many synthetic assets.

TRANSACTION_RECEIVED=43

Transaction received successfully by the gateway.

UNFAIR_DELEVERAGE=44

Deleverage is not fair, not deleveraging the maxmum amount.

UNASSIGNED_POSITION_FUNDS=45

Position containing funds and is unassigned to a public key.

UNDELEVERAGABLE_POSITION=46

Position can not be deleveraged.

UNLIQUIDATABLE_POSITION=47

Position can not be liquidated.