Skip to main content
logo

ExecuteMsgs

Credit Accounts

Create Account


_3
{
_3
"create_credit_account": "default"
_3
}

Fund Account


_13
{
_13
"update_credit_account": {
_13
"account_id": "number",
_13
"actions": [
_13
{
_13
"deposit": {
_13
"denom": "uosmo",
_13
"amount": "number"
_13
}
_13
}
_13
]
_13
}
_13
}

Fund Account and Lend Assets


_19
{
_19
"update_credit_account": {
_19
"account_id": "number",
_19
"actions": [
_19
{
_19
"deposit": {
_19
"denom": "uosmo",
_19
"amount": "number"
_19
}
_19
},
_19
{
_19
"lend": {
_19
"denom": "uosmo",
_19
"amount": "account_balance"
_19
}
_19
}
_19
]
_19
}
_19
}

Withdraw from Account


_15
{
_15
"update_credit_account": {
_15
"account_id": "24",
_15
"actions": [
_15
{
_15
"withdraw": {
_15
"denom": "uosmo",
_15
"amount": {
_15
"exact": "63793713"
_15
}
_15
}
_15
}
_15
]
_15
}
_15
}

Lending

Lend Assets


_15
{
_15
"update_credit_account": {
_15
"account_id": "number",
_15
"actions": [
_15
{
_15
"lend": {
_15
"denom": "string",
_15
"amount": {
_15
"exact": "number"
_15
}
_15
}
_15
}
_15
]
_15
}
_15
}

Withdraw


_15
{
_15
"update_credit_account": {
_15
"account_id": "24",
_15
"actions": [
_15
{
_15
"reclaim": {
_15
"denom": "uosmo",
_15
"amount": {
_15
"exact": "165163425"
_15
}
_15
}
_15
}
_15
]
_15
}
_15
}

Borrowing

Borrow Assets


_13
{
_13
"update_credit_account": {
_13
"account_id": "24",
_13
"actions": [
_13
{
_13
"borrow": {
_13
"denom": "uosmo",
_13
"amount": "663131255"
_13
}
_13
}
_13
]
_13
}
_13
}

Borrow and Withdraw to Wallet


_21
{
_21
"update_credit_account": {
_21
"account_id": "24",
_21
"actions": [
_21
{
_21
"borrow": {
_21
"denom": "uosmo",
_21
"amount": "179045439"
_21
}
_21
},
_21
{
_21
"withdraw": {
_21
"denom": "uosmo",
_21
"amount": {
_21
"exact": "179045439"
_21
}
_21
}
_21
}
_21
]
_21
}
_21
}

Repaying Loan


_17
{
_17
"update_credit_account": {
_17
"account_id": "24",
_17
"actions": [
_17
{
_17
"repay": {
_17
"coin": {
_17
"denom": "uosmo",
_17
"amount": {
_17
"exact": "497354158"
_17
}
_17
}
_17
}
_17
}
_17
]
_17
}
_17
}

Trading

Spot Trade


_19
{
_19
"update_credit_account": {
_19
"account_id": "number",
_19
"actions": [
_19
{
_19
"swap_exact_in": {
_19
"coin_in": {
_19
"denom": "string",
_19
"amount": {
_19
"exact": "number"
_19
}
_19
},
_19
"denom_out": "string",
_19
"slippage": "0.02"
_19
}
_19
}
_19
]
_19
}
_19
}

Margin Trading

Margin Long


_25
{
_25
"update_credit_account": {
_25
"account_id": "22",
_25
"actions": [
_25
{
_25
"borrow": {
_25
"denom": "stablecoin address",
_25
"amount": "number"
_25
}
_25
},
_25
{
_25
"swap_exact_in": {
_25
"coin_in": {
_25
"denom": "stablecoin address",
_25
"amount": {
_25
"exact": "number"
_25
}
_25
},
_25
"denom_out": "long asset",
_25
"slippage": "0.02"
_25
}
_25
}
_25
]
_25
}
_25
}

Margin Short


_25
{
_25
"update_credit_account": {
_25
"account_id": "22",
_25
"actions": [
_25
{
_25
"borrow": {
_25
"denom": "short asset",
_25
"amount": "number"
_25
}
_25
},
_25
{
_25
"swap_exact_in": {
_25
"coin_in": {
_25
"denom": "short asset",
_25
"amount": {
_25
"exact": "number"
_25
}
_25
},
_25
"denom_out": "stabecoin address",
_25
"slippage": "0.02"
_25
}
_25
}
_25
]
_25
}
_25
}

Trading + Lending

Spot Trade and Lend


_25
{
_25
"update_credit_account": {
_25
"account_id": "24",
_25
"actions": [
_25
{
_25
"swap_exact_in": {
_25
"coin_in": {
_25
"denom": "uosmo",
_25
"amount": {
_25
"exact": "94983584"
_25
}
_25
},
_25
"denom_out": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_25
"slippage": "0.02"
_25
}
_25
},
_25
{
_25
"lend": {
_25
"denom": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_25
"amount": "account_balance"
_25
}
_25
}
_25
]
_25
}
_25
}

Reclaim Lent Assets and Trade


_27
{
_27
"update_credit_account": {
_27
"account_id": "24",
_27
"actions": [
_27
{
_27
"reclaim": {
_27
"denom": "uosmo",
_27
"amount": {
_27
"exact": "94983584"
_27
}
_27
}
_27
},
_27
{
_27
"swap_exact_in": {
_27
"coin_in": {
_27
"denom": "uosmo",
_27
"amount": {
_27
"exact": "94983584"
_27
}
_27
},
_27
"denom_out": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_27
"slippage": "0.02"
_27
}
_27
}
_27
]
_27
}
_27
}

Margin Trade and Lending - Long


_31
{
_31
"update_credit_account": {
_31
"account_id": "24",
_31
"actions": [
_31
{
_31
"borrow": {
_31
"denom": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_31
"amount": "39671962"
_31
}
_31
},
_31
{
_31
"swap_exact_in": {
_31
"coin_in": {
_31
"denom": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_31
"amount": {
_31
"exact": "39671962"
_31
}
_31
},
_31
"denom_out": "uosmo",
_31
"slippage": "0.02"
_31
}
_31
},
_31
{
_31
"lend": {
_31
"denom": "uosmo",
_31
"amount": "account_balance"
_31
}
_31
}
_31
]
_31
}
_31
}

Margin Trade and Lending - Short


_31
{
_31
"update_credit_account": {
_31
"account_id": "24",
_31
"actions": [
_31
{
_31
"borrow": {
_31
"denom": "uosmo",
_31
"amount": "343368619"
_31
}
_31
},
_31
{
_31
"swap_exact_in": {
_31
"coin_in": {
_31
"denom": "uosmo",
_31
"amount": {
_31
"exact": "531474119"
_31
}
_31
},
_31
"denom_out": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_31
"slippage": "0.02"
_31
}
_31
},
_31
{
_31
"lend": {
_31
"denom": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_31
"amount": "account_balance"
_31
}
_31
}
_31
]
_31
}
_31
}

Farm

Deposit 50/50 Farm


_38
{
_38
"update_credit_account": {
_38
"account_id": "24",
_38
"actions": [
_38
{
_38
"provide_liquidity": {
_38
"coins_in": [
_38
{
_38
"denom": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_38
"amount": {
_38
"exact": "38928713"
_38
}
_38
},
_38
{
_38
"denom": "uosmo",
_38
"amount": {
_38
"exact": "120072695"
_38
}
_38
}
_38
],
_38
"lp_token_out": "gamm/pool/678",
_38
"slippage": "0.02"
_38
}
_38
},
_38
{
_38
"enter_vault": {
_38
"coin": {
_38
"denom": "gamm/pool/678",
_38
"amount": "account_balance"
_38
},
_38
"vault": {
_38
"address": "osmo1jfmwayj8jqp9tfy4v4eks5c2jpnqdumn8x8xvfllng0wfes770qqp7jl4j"
_38
}
_38
}
_38
}
_38
]
_38
}
_38
}

Leveraged Yield Farming


_56
{
_56
"update_credit_account": {
_56
"account_id": "24",
_56
"actions": [
_56
{
_56
"borrow": {
_56
"denom": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_56
"amount": "242378470"
_56
}
_56
},
_56
{
_56
"swap_exact_in": {
_56
"coin_in": {
_56
"denom": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_56
"amount": {
_56
"exact": "121189235"
_56
}
_56
},
_56
"denom_out": "uosmo",
_56
"slippage": "0.02"
_56
}
_56
},
_56
{
_56
"provide_liquidity": {
_56
"coins_in": [
_56
{
_56
"denom": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_56
"amount": {
_56
"exact": "144599161"
_56
}
_56
},
_56
{
_56
"denom": "uosmo",
_56
"amount": {
_56
"exact": "446005258"
_56
}
_56
}
_56
],
_56
"lp_token_out": "gamm/pool/678",
_56
"slippage": "0.02"
_56
}
_56
},
_56
{
_56
"enter_vault": {
_56
"coin": {
_56
"denom": "gamm/pool/678",
_56
"amount": "account_balance"
_56
},
_56
"vault": {
_56
"address": "osmo1jfmwayj8jqp9tfy4v4eks5c2jpnqdumn8x8xvfllng0wfes770qqp7jl4j"
_56
}
_56
}
_56
}
_56
]
_56
}
_56
}

Unlock Vault


_15
{
_15
"update_credit_account": {
_15
"account_id": "24",
_15
"actions": [
_15
{
_15
"request_vault_unlock": {
_15
"vault": {
_15
"address": "osmo1jfmwayj8jqp9tfy4v4eks5c2jpnqdumn8x8xvfllng0wfes770qqp7jl4j"
_15
},
_15
"amount": "37601963208325379423921404"
_15
}
_15
}
_15
]
_15
}
_15
}

Farm + Margin Trade


_56
{
_56
"update_credit_account": {
_56
"account_id": "24",
_56
"actions": [
_56
{
_56
"provide_liquidity": {
_56
"coins_in": [
_56
{
_56
"denom": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_56
"amount": {
_56
"exact": "38928713"
_56
}
_56
},
_56
{
_56
"denom": "uosmo",
_56
"amount": {
_56
"exact": "120072695"
_56
}
_56
}
_56
],
_56
"lp_token_out": "gamm/pool/678",
_56
"slippage": "0.02"
_56
}
_56
},
_56
{
_56
"enter_vault": {
_56
"coin": {
_56
"denom": "gamm/pool/678",
_56
"amount": "account_balance"
_56
},
_56
"vault": {
_56
"address": "osmo1jfmwayj8jqp9tfy4v4eks5c2jpnqdumn8x8xvfllng0wfes770qqp7jl4j"
_56
}
_56
}
_56
},
_56
{
_56
"borrow": {
_56
"denom": "stablecoin address",
_56
"amount": "number"
_56
}
_56
},
_56
{
_56
"swap_exact_in": {
_56
"coin_in": {
_56
"denom": "stablecoin address",
_56
"amount": {
_56
"exact": "number"
_56
}
_56
},
_56
"denom_out": "long asset",
_56
"slippage": "0.02"
_56
}
_56
}
_56
]
_56
}
_56
}

Farm + Margin Trade + Lend


_64
{
_64
"update_credit_account": {
_64
"account_id": "24",
_64
"actions": [
_64
{
_64
"provide_liquidity": {
_64
"coins_in": [
_64
{
_64
"denom": "ibc/D189335C6E4A68B513C10AB227BF1C1D38C746766278BA3EEB4FB14124F1D858",
_64
"amount": {
_64
"exact": "38928713"
_64
}
_64
},
_64
{
_64
"denom": "uosmo",
_64
"amount": {
_64
"exact": "120072695"
_64
}
_64
}
_64
],
_64
"lp_token_out": "gamm/pool/678",
_64
"slippage": "0.02"
_64
}
_64
},
_64
{
_64
"enter_vault": {
_64
"coin": {
_64
"denom": "gamm/pool/678",
_64
"amount": "account_balance"
_64
},
_64
"vault": {
_64
"address": "osmo1jfmwayj8jqp9tfy4v4eks5c2jpnqdumn8x8xvfllng0wfes770qqp7jl4j"
_64
}
_64
}
_64
},
_64
{
_64
"borrow": {
_64
"denom": "stablecoin address",
_64
"amount": "number"
_64
}
_64
},
_64
{
_64
"swap_exact_in": {
_64
"coin_in": {
_64
"denom": "stablecoin address",
_64
"amount": {
_64
"exact": "number"
_64
}
_64
},
_64
"denom_out": "long asset",
_64
"slippage": "0.02"
_64
}
_64
},
_64
{
_64
"lend": {
_64
"denom": "string",
_64
"amount": {
_64
"exact": "number"
_64
}
_64
}
_64
}
_64
]
_64
}
_64
}