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_FULFILLMENT_ASSETS_RATIO=8
Synthetic/collateral order ratio not satisfied in fulfillment transaction.
INVALID_FUNDING_TICK_TIMESTAMP=12
Funding tick timestamp is not valid, not progressing compared to the previous.
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_ORACLE_PRICE_SIGNED_IN_TIME_RANGE=21
Missing oracle price for synthetic asset with enough signatures in valid time range.