← Back

How to use GammaSwap V2: Order Types and UI

A guide to using the UI and order types on GammaSwap V2.

DeFi Devin

Introduction

GammaSwap V2 is a crypto prediction market or digital option exchange.

Digital options are financial derivatives that pay a fixed amount or zero based on the price of an asset at expiration. It is an all or nothing trade on whether an asset meets a specific condition at expiration.

You can trade market orders or limit orders for digital option contracts via the GammaSwap V2 user interface.

Market Order

A market order is a request to buy or sell a contract immediately at the best available current price in the market.

It guarantees speed since you immediately get filled but there is no guarantee on price since you're taking liquidity off the book. Your size relative to the book will determine your slippage.

A market order is always taking liquidity and therefore it is always charged taker fees.

For market orders, you can do a 1-tap trade or a standard market order in the UI.

1-Tap Trading

A 1-tap trade involves tapping or clicking $ margin pre-set buttons.

Make sure to enable the 1-tap checkbox to trade.

After clicking the pre-set trade button, your market order will immediately execute and you can see your position in both the positions table & trade tool after.

Standard Market Order

To open a standard market order, select "Market" on the trade tool. The market tab has an input box, which you can choose to denominate in contracts or USDC. The dropdown selector is above the input box.

The UI will tell you the cost, avg price and how much you will win at settlement if you are right when you input in your size. If everything looks good, click the "Place Order" button to open your position.

Limit Order

A limit order is an order instruction to buy or sell a contract at a specific price and size. A limit order can be a taker order if it crosses the spread, such as in an algorithmic trading strategy, but it is usually a maker order since it sits on the book.

Maker orders add liquidity to the book, taker orders reduce liquidity of the book.

Why sets limits as a taker instead of market orders?

  • GammaSwap V2 charges zero maker fees. In fact, you get rebated on each fill as a maker from taker fees so your effective fee rate is negative.
  • No slippage even if liquidity is low.
  • Since V2 is a margin exchange, opposing positions cancel each other out unlike all other onchain prediction markets which use the Conditional Token Framework (CTF). Therefore, you can use a limit order to set a price to take profit ahead of time.

To open a limit order, simply enter your entry price and the amount of contracts you would like to buy or sell. You can also click on the level in the order book to populate the entry price.

Once you input the entry price and contract, you will see your cost if you get filled, the avg price and how much you are set to win at settlement if you are right.

The UI will also warn you if you match against other orders when setting your limit so you can avoid paying taker fees.

You can see here that it shows "Matching $65.3790" which means you would pay taker fees on that matched liquidity. If you want to be a maker, set a limit at a price that doesn't cross the spread.

API Usage

The API allow you to open multiple order types, many are not practical to use unless part of an automated trading strategy.

  • FOK (Fill or Kill): Execute the entire order immediately or cancel it completely.
  • IOC (Immediate or Cancel): Execute whatever portion is available immediately and cancel the unfilled remainder.
  • GTC (Good till Cancel): Order is live until cancelled. Default order type on UI.
  • **ALO (Add Liquidity Only):**Order is cancelled if upon arrival it crosses the spread. Also known as post-only.
  • **Cancel and Replace:**Cancel and replace an order in the same response. Side of replacement order must match cancelled order's side (e.g. only a long order can replace a long order). If the cancel fails, the entire order fails. If the cancel succeeds but the replacement fails (e.g. margin, ALO crossing spread, etc.), the cancel is honored. Cancel replacing an order results in a new orderId and therefore resets the client's place in the queue.

Conclusion

If you would like more information on GammaSwap V2, you can find it in the docs. You can also ask our team any questions you may have in the Discord or by creating a support ticket (#createticket channel in Discord).