An order, sometimes called an offer, is a request to trade a certain amount of one token for a certain amount of another token. An order is cryptographically signed to prove that the account that made the order intends for it to be executed.
The account that creates and signs an order. Within an order, the maker is indicated by an Ethereum account address.
The account that fills an order with the 0x Exchange Contract. Sometimes, an order may specify a taker address, in which case that is the only account that may fill the order. Other times the taker address is left blank, allowing anyone to fill the order.
Maker Token
The token that the maker of an order is offering.
Taker Token
The token that the taker of an order must provide to the maker to complete the order.
Ethereum is a blockchain that allows the execution of general purpose smart contracts. Each token that can be traded on OpenRelay is its own Ethereum smart contract. The 0x Exchange is also an Ethereum smart contract.
0x Protocol
The 0x protocol allows users to trustlessly exchange ERC20 tokens. It uses off-chain relays, and settles transactions through the 0x Exchange Contract.
Exchange Contract
The 0x Exchange Contract allows Ethereum accounts to fill orders. It verifies the cryptographic signature on the order, and transfers tokens between the maker and the taker, as well as transferring any fees to the relay.
ERC20 Token
The ERC20 Token Standard defines a specific set of methods and events that an Ethereum contract should implement to have a transferrable token. To be tradeable via the 0x Protocol, tokens must implement the ERC20 specification.
The Ethereum base currency, Ether, exists independently of any single contract, and does not comply with the ERC20 specification. To be able to trade Ether through 0x, which only works with ERC20 tokens, we must convert it into an ERC20 token. WETH is an ERC20 token contract. You can send Ether to the WETH contract, and it will issue you ERC20 tokens (WETH) equal to the amount of Ether sent. At any time you may redeem your WETH tokens from the contract, and it will replace them with an equal number of Ether.
Order Book
An order book is a collection of orders. OpenRelay provides an API for searching through all open orders.
An order is filled when a taker submits the order to the 0x Exchange Contract. The taker is responsible for calling one of the contract’s fill functions, and is must pay the gas for the Ethereum transaction.
Gas is a proxy for the computational requirements of an Ethereum transaction. Every Ethereum transaction has a gas limit (a maximum amount of computation allowed by the transaction). When a transaction is submitted, it specifies a gas price, indicating the amount of Ether the submitter is willing to pay for each unit of gas. In general, transactions with high gas prices get included into blocks sooner than transactions with low gas prices.
Token Proxy
The 0x Protocol uses a contract called a Token Proxy to transfer tokens between the maker and taker when an order is filled. Users must approve the Token Proxy to transfer ERC20 Tokens on behalf of the user.
Web3 provides a standard interface for interacting with Ethereum in JavaScript. There are several different Web3 providers, including browsers like Metamask, and Mist, as well as a Node JS Package.